RE: [PHP-DB] parsing 2 results per row in different <td>'s

From: Date: Thu, 28 Mar 2002 22:04:17 +0000
Subject: RE: [PHP-DB] parsing 2 results per row in different <td>'s
Groups: php.db 
Request: Send a blank email to php-db+get-18017@lists.php.net to get a copy of this message
why not simply call $row = mysql_fetch_array($result) again inside the loop? Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -----Original Message----- From: valentino [mailto:junk@cyberiders.net] Sent: Thursday, March 28, 2002 1:43 AM To: php-db@lists.php.net Subject: [PHP-DB] parsing 2 results per row in different <td>'s i'm having trouble telling php to format the output of a mysql query correctly. i not only want to loop the output in simple table rows (meaning that php parses one result per row), instead i want php to parse two results per row in different <td>'s. no clue what i'm talking about? take my following simplyfied code: .... $result = @mysql_query("SELECT * FROM news"); ... while ( $row = mysql_fetch_array($result) ): ... <tr> <td><?=$row["newsBODY"]?></td> </tr> .... endwhile; --- the output would look like: <html> <tr> <td>blabla</td> </tr> <tr> <td>lalala</td> </tr> <tr> <td>doowaadee</td> </tr> <tr> <td>yipeeiyo</td> </tr> --and so on-- what i want is the following output <tr> <td>blablabla</td> <td>lalala</td> </tr> <tr> <td>doowaadee</td> <td>yipeeiyo</td> </tr> --and so on-- got the point? i really do appreciate your help! thx, val -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#18017) next »