Re: [PHP] checking if an array is empty

2002-09-21 Thread Sascha Cunz
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:

Re: [PHP] checking if an array is empty

2002-09-21 Thread Michael Sims
On Sun, 22 Sep 2002 01:13:08 +1000, you wrote: 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 I find that empty() works

Re: [PHP] checking if an array is empty

2002-09-21 Thread electroteque
thats the thing , the word Array is what it returns even though there was no input file. Michael Sims [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Sun, 22 Sep 2002 01:13:08 +1000, you wrote: how can i check if an array is currently empty , for instance i

Re: [PHP] checking if an array is empty

2002-09-21 Thread Michael Sims
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

RE: [PHP] checking if an array is empty

2002-09-21 Thread electroteque
yeh wicked thanks -Original Message- From: Michael Sims [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 22, 2002 11:48 AM To: [EMAIL PROTECTED] Cc: electroteque Subject: Re: [PHP] checking if an array is empty On Sun, 22 Sep 2002 11:09:16 +1000, you wrote: thats the thing