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
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 [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 22, 2001 2:41 AM
Subject: [PHP] All of a sudden I get
ie.
Oops! Hit the right keys at the wrong time! :)
if (! count ($array_id))
{
echo '$array_id is empty or not set.';
}
else if (1 == count($array_id))
{
$string_id=$array_id;
}
else
{
$string_id= implode(:,$array_id);
}
--zak
--
PHP General Mailing List (http://www.php.net/)
To
Try:
if (!is_array($array_id))
{
$string_id=$array_id;
}
else
{
$string_id= implode(:,$array_id);
}
You have to always make sure, you are passing Array into an implode() or
explode().
BTW: your
4 matches
Mail list logo