Prev: ie multi tab label share one cookie?
Next: UPSERT MYSQl
From: Emiliano Boragina on 15 Jun 2010 15:20 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
From: "Systems" on 15 Jun 2010 15:56 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(a)gmail.com] Sent: Tuesday, June 15, 2010 3:21 PM To: php-db(a)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
From: Emiliano Boragina on 15 Jun 2010 16:02 sorry... why $i = 0 again? 2010/6/15 Systems <systems(a)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(a)gmail.com] > Sent: Tuesday, June 15, 2010 3:21 PM > To: php-db(a)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 > >
From: Emiliano Boragina on 15 Jun 2010 16:03 sorry again... thanks for your answer... 2010/6/15 Emiliano Boragina <emiliano.boragina(a)gmail.com> > sorry... why $i = 0 again? > > 2010/6/15 Systems <systems(a)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(a)gmail.com] >> Sent: Tuesday, June 15, 2010 3:21 PM >> To: php-db(a)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 >> >> >
From: Emiliano Boragina on 15 Jun 2010 16:15
thank youuuuuu... work... I understand why the $i = 0 again... thanks thanks thanks 2010/6/15 Systems <systems(a)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(a)gmail.com] > Sent: Tuesday, June 15, 2010 3:21 PM > To: php-db(a)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 > > |