note 18389 modified in function.mysql-fetch-array by imajes

From: Date: Mon, 21 Jan 2002 10:23:41 +0000
Subject: note 18389 modified in function.mysql-fetch-array by imajes
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25617@lists.php.net to get a copy of this message
Hi to enumerate a result set with out worrying about null values just use below code. while($myrow = mysql_fetch_row($result)) { print " <tr> "; for($x=0; $x <= count($myrow); $x++) { print "<td>myrow[$x]</td>"; } print "</tr>"; } [ed note: tidied code so it actually works] --was-- Hi to enumerate a result set with out worrying abt null values just use below code. while($myrow = mysql_fetch_row$result)) { print " <tr> "; for($x=0;$x<=count($myrow);$x++) { print "<td bgcolor=><font face=Arial size=1>$myrow[$x]</font></td>"; } print "</tr>"; } http://www.php.net/manual/en/function.mysql-fetch-array.php

« previous php.notes (#25617) next »