implode errors if array empty

From: Date: Wed, 22 Sep 2004 10:16:47 +0000
Subject: implode errors if array empty
Groups: php.general 
Request: Send a blank email to php-general+get-197540@lists.php.net to get a copy of this message
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.

« previous php.general (#197540) next »