note 32793 deleted from function.sizeof by didou
| From: | didou@php.net | Date: | Wed, 15 Oct 2003 17:29:55 +0000 |
| Subject: | note 32793 deleted from function.sizeof by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58651@lists.php.net to get a copy of this message | ||
Note Submitter: manicdepressive@NOSPAM.mindless.com
----
ricardo, jcollins:
the reason sizeof return 8 instead of 4 is that (from
the mysql_fetch_array page):
In addition to storing the data in the numeric indices of the result array, [mysql_fetch_array] also
stores the data in associative indices, using the field names as keys.
so you're getting an array that looks like this:
array(
0 => 0,
'cp1' => 0,
1 => 0,
'cp2' => 0,
2 => 0,
'cp3' => 0,
3 => 0,
'cp4' => 0,
)
four columns, eight elements.
this topic is explored further on that page.