Forum Moderators: coopster
They're the way the sprintf [php.net] function formats the variables that follow. Check out the manual and you can see what it's doin'.
Tim
'%s %s %d %d'
$tables["subscribepage"],$title,$owner,$id
OR
sprintf('%s %s %d %d',$tables["subscribepage"],$title,$owner,$id);
notice the first %s will get replaced with $tables["subscribepage"], the second %s will get replaced with $title, the first %d will get replaced with $owner, and the second %d will get replaced with $id.
%s means you are putting a string there and %d means you are putting a decimal there.
for every %<letter> there must be a variable and they all must be in the correct order.
Does that help?
Therefore notice difference:
sprintf("This is int: %d, this is float: %f", 12.345, 12.345);
To do this with echo or normal print you would have to write:
$a = 12.345;
echo "This is int: ".(int)$a.", this is float: ".$a;
Both methods are giving the same result. I cannot say which is better and which you should use.
Hope this cleares things a bit
Michal Cibor
More about this function you will find here: [php.net...]