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
- [PHP] question Meltem Demirkus
- Re: [PHP] question John Wards
- Re: [PHP] question Miles Thompson
- Re: [PHP] question Adam Williams
- [PHP] Question Roman Duriancik
- [PHP] question r.vellinga
- Re: [PHP] question Justin French
- Re: [PHP] question Andy Turegano
- [PHP] question Jos Elkink
- Re: [PHP] question 1LT John W. Holmes
- Re: [PHP] Question Mike Tuller
- Re: [PHP] Question 1LT John W. Holmes
- [PHP] question Karl James
- Re: [PHP] question David Rice
- Re: [PHP] question Justin French
- RE: [PHP] question David Freeman
- [PHP] Question Clint Tredway
- Re: [PHP] Question Mark Heintz PHP Mailing Lists
- [PHP] Re: Question Dan Phiffer
- Re: [PHP] Question Hugh Danaher
- [PHP] Question Marius