note 56612 deleted from function.mysql-result by mazzanet
| From: | mazzanet@php.net | Date: | Fri, 09 Sep 2005 08:38:59 +0000 |
| Subject: | note 56612 deleted from function.mysql-result by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-94942@lists.php.net to get a copy of this message | ||
Note Submitter:
----
wow this's exactly what i was looking for, but there's a bug, just replace
for($i = 0; $i < count($row); $i++) {
for($i = 0; $i < mysql_num_fields($result); $i++) {
function mysql_result_all($result) {
echo '<table>';
for($i = 0; $i < mysql_num_fields($result); $i++) {
echo '<th>';
echo mysql_field_name($result,$i);
echo '</th>';
}
while($row = mysql_fetch_array($result)) {
echo '<tr>';
for($i = 0; $i < count($row); $i++) {
echo '<td>'.$row[$i].'</td>';
}
echo '</tr>';
}
echo '</table>';
}