Re: newbie algorithm help!!!!!

From: Date: Wed, 20 Jun 2001 18:47:30 +0000
Subject: Re: newbie algorithm help!!!!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54581@lists.php.net to get a copy of this message
<?php $array[0] = 0; $array[1] = 0; $array[2] = 0; $array[3] = 0; $array[4] = 0; $array[5] = 0; echo " <table> <tr> "; foreach($array as $pos => $val) if ( !(@$row++ % 2) AND $row != 1) echo " </tr><tr> <td>$val </td> "; else echo " <td>$val </td> "; echo " </tr> </table> "; ?> -- Chris Lee lee@mediawaveonline.com ""McShen"" <webmaster@celeritieszones.com> wrote in message news:9gqm6o$g6n$1@w153.z064000151.sjc-ca.dsl.cnc.net... > hi > i have a mysql table with approx. 30 entries. > > I wanna get them(i know how to do that) and list them in a 2-column table. I > have been trying to use a loop to do it. But it will only produce a 1-column > table. it's like > > entry 1 > entey 2 > entry 3 > entry 4 > etc > > Please help me so that i can get this : > > entry1 entry2 > entry3 entry4 > > Thanks in advanced. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#54581) next »