$num = 5;//modifiable par $_GET['num']
$location = 'tree';

$format = 'There are %d monkeys in the %s';
echo sprintf($format, $num, $location);

There are 5 monkeys in the tree