note 15090 deleted from function.sizeof by jimw
| From: | jimw@php.net | Date: | Wed, 03 Apr 2002 18:58:41 +0000 |
| Subject: | note 15090 deleted from function.sizeof by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-28564@lists.php.net to get a copy of this message | ||
One thing to remember when using sizeof() would be that the number it returns is 1-based , not
0-based;so if you are going to insert data from an array into a database, and are using a for loop,
be sure to use the for-loop counter from 0 to the value 1 less than the value returned by the sizeof
function, for example :
for ($i = 0;$i < sizeof($array);$i++)
and not :
for ($i = 0;$i = sizeof($array);$i++)