The sprintf function returns a formatted string. There are about 20 different formats/specifiers that can be used.

    
    $user = "Rachel";
    $age = 23;

    sprintf("%s is %d years old", $user, $age);
    // Rachel is 23 years old