note 2188 deleted from count by ronabop

From: Date: Wed, 18 Oct 2000 04:57:21 +0000
Subject: note 2188 deleted from count by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-6627@lists.php.net to get a copy of this message
To save some time, which I have lost figuring this out.... It was mentioned, by another user for the sizeof() function, that the results returned may not be what you suspect. Empty values in an array are not counted, for example: $a["1"] = "Hello" $a["2"] = "" $a["3"] = "Fruit" Using count($a) would return 2 not 3 since $a["3"] is empty. The fix is to have a precount variable setup that contains the actual count you want, in this case $b = 3.

« previous php.notes (#6627) next »