Re: All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133

From: Date: Tue, 22 May 2001 08:46:51 +0000
Subject: Re: All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53827@lists.php.net to get a copy of this message
Sounds like you are trying to implode a non-existant array. Change your code to handle an empty or missing array. ie. ----- Original Message ----- From: "Martin Cabrera Diaubalick" <martin@notodo.com> To: <php-general@lists.php.net> Sent: Tuesday, May 22, 2001 2:41 AM Subject: [PHP] All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133 > Hello Everyone! > > This is my code > > ************************************************ > if (count($array_id)==1) > { > $string_id=$array_id; > } > else > { > $string_id= implode(":",$array_id); > } > ************************************************ > > I've been testing it for three days and never had an error, now it comes and > goes. Do you know what could be wrong? > > $array_id is an array of integers > > Thanks in advance > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#53827) next »