note 38501 deleted from function.dbase-numfields by didou
| From: | didou@php.net | Date: | Wed, 24 Dec 2003 13:59:53 +0000 |
| Subject: | note 38501 deleted from function.dbase-numfields by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-62420@lists.php.net to get a copy of this message | ||
Note Submitter: imax@intercomax.com.br
----
if you wanna show all the registers of a table just do it:
$tot = dbase_numrecords($dbf);
if($tot > 1)
{
echo "<center>Total: ".($tot-1)."<center><br>";
echo "<table border=1 cellpadding=8 cellspacing=0 align=center>";
for($x=1; $x < $tot; $x++)
{
$rec = dbase_get_record($dbf, $x);
$nf = dbase_numfields($dbf);
echo "<tr>";
for ($i=0; $i < $nf; $i++)
{
echo "<td>$rec[$i]</td>";
}
echo "</tr>";
}
echo "</table>";
}
why tot > 1 ? its seens that the first reg. its the header