php formated Print statement


$num = 5;

$location = 'tree';


$format = 'There are %d monkeys in the %s';

echo 
sprintf($format, $num, $location);

Comments

Popular posts from this blog