Bug #6152: count() function not returning proper value

From: Date: Mon, 14 Aug 2000 19:26:09 +0000
Subject: Bug #6152: count() function not returning proper value
Groups: php.dev 
Request: Send a blank email to php-dev+get-28846@lists.php.net to get a copy of this message
From: jdoyon@nrcan.gc.ca Operating system: Linux RedHat 6.2 PHP version: 3.0.15 PHP Bug Type: Misbehaving function Bug description: count() function not returning proper value I just discovered that the count() function to return the length of an array does not seem to be returning the proper value. I have an array of length 858, and it keeps telling me it's 464 ! If I manually force the loop I can output all elements, whereas if I use a for() loop with "$i < count($array)" as I usually do, I get only part of it ! I suspect this maybe caused by the fact that this is an array of counters, where not all single elements might get initialized. (i.e. some counters increase, some remain NULL).

« previous php.dev (#28846) next »