Testing for an empty array (with null values)
| From: | zzapper | Date: | Fri, 30 Sep 2005 17:27:05 +0000 |
| Subject: | Testing for an empty array (with null values) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-223475@lists.php.net to get a copy of this message | ||
Hi,
I can use
if (count($somearray) > 0) to test for an empty array.
It is possible to have an array with null values which is effectively empty but fails the above as
it's count (I belive is greater than 0).
Any ideas
--
zzapper
Success for Techies and Vim,Zsh tips
http://SuccessTheory.com/