I have run a SQL query and want to display the results... but i have them to be
1 - 2 - 3 4 - 5 - 6 7 - 8 - 9
So three on a line before it starts a new one!!
Any ideas??
Please search in future this has been asked numerous of times.
//query $i = 0; while ($row = mysql_fetch_array($query)) { if (($i%3)==0) echo "<br />"; //stuff here $i++; }
It should be something like this not tested.