note 40769 added to function.mysql-fetch-array
| From: | sales at historicfuture dot com | Date: | Sun, 14 Mar 2004 05:33:16 +0000 |
| Subject: | note 40769 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-66807@lists.php.net to get a copy of this message | ||
This snip is a variation on one above with neater out put.
<table style="width: 100%; text-align: left;" border="1"
cellpadding="2"
cellspacing="0">
<?
$fields = mysql_query("select * from table");
$row=mysql_fetch_array($fields, MYSQL_ASSOC);
echo "<tr>";
while(list($key,$val) = each($row) ) {
echo "<td>$key</d>";
}
echo "</tr>";
while($row=mysql_fetch_array($fields, MYSQL_ASSOC)) {
echo "<tr>";
while(list($key,$val) = each($row) ) {
echo "<td> $val</d>";
}
echo "</tr>";
}
mysql_free_result($fields);
?>
</table>
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40769
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40769&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40769&report=yes
Search -- http://master.php.net/manage/user-notes.php