RE: [PHP-DB] table html with PHP

From: Date: Tue, 15 Jun 2010 20:59:58 +0000
Subject: RE: [PHP-DB] table html with PHP
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-47226@lists.php.net to get a copy of this message
Sure thing, Eli (you might need to revisit the variable index - $variable[0], since this will return the same var all the time. unless of course that's what you want to do.) From: Emiliano Boragina [mailto:emiliano.boragina@gmail.com] Sent: Tuesday, June 15, 2010 4:16 PM To: Systems Cc: php-db@lists.php.net Subject: Re: [PHP-DB] table html with PHP thank youuuuuu... work... I understand why the $i = 0 again... thanks thanks thanks 2010/6/15 Systems <systems@3dgtech.com> I assume you're looking for something like: <table> <tr> <?php $i = 0; while(array) { echo "<td>$varible[0]</td>"; $i++; If ($i>1) { $i=0; echo '</tr><tr>'; } } ?> </tr> </table> -----Original Message----- From: Emiliano Boragina [mailto:emiliano.boragina@gmail.com] Sent: Tuesday, June 15, 2010 3:21 PM To: php-db@lists.php.net Subject: [PHP-DB] table html with PHP Hello everyone, I need to know how do I do a two columns table with a register per cell. <table....> <tr> <?php $i = 0; while(array) { echo "<td>$varible[0]</td>"; } j++ if j > 2 echo "</tr>" ?> </table> this dont work very well. Thanks a lot

« previous php.db (#47226) next »