Hi, I am using the following code to produce a list of surnames:-
$result = mysql_query(\"SELECT DISTINCT surname FROM tblIndividual WHERE surname LIKE \'A%\' ORDER BY surname ASC\",$db);
if ($myrow = mysql_fetch_array($result)) {
do {
printf(\"%s \\n<br>\", $myrow[\"surname\"]);
} while ($myrow = mysql_fetch_array($result));
however I would like to display the results in a table with 5 columns. Can anyone help me? I have managed to get the results to repeat for 5 columns then the next result on the next line, eg.
ABBY | ABBY | ABBY | ABBY | ABBY
ALES | ALES | ALES | ALES | ALES
but obviously that is no good. What I would like is:
ABBY | ALES | ANDY | APAN | AZAR
Please help.