Question
| From: | Mike Tuller | Date: | Fri, 31 Jan 2003 18:00:36 +0000 |
| Subject: | Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-133812@lists.php.net to get a copy of this message | ||
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