There are many different states, in which an array would be empty. Can you 
post the output of a "var_dump($array);" in that special case you want to 
check?

In general:

1. the variable may not have been set:
   if (!isset($myarray)) echo 'error';

2. the variable is set, but ain't an array:
   if (!isarray($myarray) echo 'error';

3. the variable is set and is an array, but contains no data:
   if (array_count($myarray) == 0) echo 'error';

I think the 3rd case could apply to your problem, but only a print_r or 
var_dump of the $_POST['myarray'] can show this.

Sascha

Am Samstag, 21. September 2002 17:13 schrieb electroteque:
> how can i check if an array is currently empty , for instance i have a file
> input field with an array name for multiple images, i need to check if
> there was no file uploaded in that field name and ignore it in the loop


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to