note 8295 modified in count by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Mon, 04 Sep 2000 21:25:04 +0000 |
| Subject: | note 8295 modified in count by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4151@lists.php.net to get a copy of this message | ||
[Editor's note: if you want to disambiguate if a variable contains an array w/ only one
element, just us is_array() or gettype(), your solution is not logical - jmcastagnetto@php.net]
Has someone thought of the possibility of an array containing only 1 element ?. Because count would
then return 1 as if the array wasn't an array.
How about returning -1. Seems more to the point anyways.
http://www.php.net/manual/function.count.php