Re: amount of elements in an array ? - building dynamic html tables for sets of MySQL results
| From: | Jon Parise | Date: | Tue, 11 Jul 2000 14:57:15 +0000 |
| Subject: | Re: amount of elements in an array ? - building dynamic html tables for sets of MySQL results | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5927@lists.php.net to get a copy of this message | ||
On Tue, Jul 11, 2000 at 02:12:51PM +0100, Nick wrote:
> Is there a way of finding out the amount of elements in an array ?
http://www.php.net/manual/function.count.php
> while($array=mysql_fetch_row ($this->Query_ID)):
> $i = 0;
> $j = [amount of elements in $array];
$j = count($array);
> echo "<tr>";
> while ($i < $j):
> echo "<tr><td>$db->Rowdata[$i]</td>
> <td>"; $i++;
> endwhile;
> echo "</tr>";
--
Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House
Member