Hi,
Could anybody tell me how the "%s" works when formatting values?
I need to format the date too, to something more readable.
Can anyone explain how this works aswell?
If someone could point me a tutorial that would be great.
Thanks
My code is attached
if ($myrow = mysql_fetch_array($result)) {
echo "<table >\n";
echo "<tr><td>Title</td><td>description</td><td>Start date</td><td>End date</td></tr>\n";
do {
printf("<tr><td>%s\n</td>", $myrow["eventtitle"]);
printf("<td>%s\n</td>", $myrow["eventdescription"]);
printf("<td>%s\n</td>", $myrow["startdate"]);
printf("<td>%s\n</td></tr>", $myrow["enddate"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";
}