looping

From: Date: Mon, 15 Jan 2001 18:47:26 +0000
Subject: looping
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34645@lists.php.net to get a copy of this message
excuse my density today my brain is still in weekend mode how would I make this loop put 4 or 5 items (haven't decided) per line instead of just one item and the checkbox on each line? <snip> echo "<table border='1' cellpadding='2' cellspacing='2'>"; while($myrow = mysql_fetch_array($result2)) { $name = $myrow["name"]; $personal_cost = $myrow["personal_cost"]; $small_cost = $myrow["small_cost"]; $large_cost = $myrow["large_cost"]; $category = $myrow["category"]; echo "<tr>"; echo "<td>"; echo $name; echo "</td>"; echo "<td><input type=checkbox name=topping value=".$cost.">".$cost."</td>"; echo "</tr>"; } echo "</table>"; </snip> Jerry Lake

« previous php.general (#34645) next »