I am working from an example in a book that has the following and is not explained very well:

# read results of query, then clean up
while ($row = mysql_fetch_row($result))
{
print ("<TR>\n");
for ($i = 0; $i < mysql_num_fields ($result); $i++)
{
# escape any special characters and print
printf ("<TD>%s</TD>\n", htmlspecialchars ($row[$i]));
}
print ("</TR>\n");
}

I understand most of what is going on here except for this line:

printf ("<TD>%s</TD>\n", htmlspecialchars ($row[$i]));

Can someone explain to me what the %s is?

Mike


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to