Re: implode errors if array empty
| From: | luke at lukem dot co dot uk | Date: | Wed, 22 Sep 2004 10:23:31 +0000 |
| Subject: | Re: implode errors if array empty | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-197541@lists.php.net to get a copy of this message | ||
resolved with if(empty()) - apologies.
luke@lukem.co.uk wrote:
> hi there,
>
> i am using implode to get the contents of an array into a single variable:
>
> $enterprises = implode(",", $enterprise) //enterprise contains the array.
>
> however, if the array is empty (the user didnt select anything in the form),
> the implode function errors out.
>
> can anyone think of a way round this?
>
> many thanks,
>
> luke m.