Re: checking if an array is empty

From: Date: Sun, 22 Sep 2002 01:48:24 +0000
Subject: Re: checking if an array is empty
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-117132@lists.php.net to get a copy of this message
On Sun, 22 Sep 2002 11:09:16 +1000, you wrote: >thats the thing , the word Array is what it returns even though there was no >input file. Oh, I see. Without seeing your code, the best recommendation I have is to loop through the array and remove the empty elements, then check to see if the array is empty, something like this: if (is_array($array)) { foreach ($array as $key => $element) { if ($element == "") { unset($array[$key]); } } } if (empty($array)) { ... } Sorry if I'm still misunderstanding...

« previous php.general (#117132) next »