Crisp
01-29-2010, 07:11 AM
Hey,
I get this: Warning: implode() [function.implode (http://localhost/forum/function.implode)]: Invalid arguments passed
Once there is nothing in the array. (I use a while loop)
If there is something in the array, it will work.
Anyways, is there some way I can set a default value of...null?
All I want is it to be empty instead of saying the above when it's empty, and when there's something in there, it does it (Which works fine).
So what I'm asking is, how can I take away that error?
Code:
while($attach = mysql_fetch_array($attachments))
{
$attachment[] = htmlentities($attach['file']);
}
$attachment = implode(", ", $attachment);
and the function:
attachedFiles();
Thanks!
I get this: Warning: implode() [function.implode (http://localhost/forum/function.implode)]: Invalid arguments passed
Once there is nothing in the array. (I use a while loop)
If there is something in the array, it will work.
Anyways, is there some way I can set a default value of...null?
All I want is it to be empty instead of saying the above when it's empty, and when there's something in there, it does it (Which works fine).
So what I'm asking is, how can I take away that error?
Code:
while($attach = mysql_fetch_array($attachments))
{
$attachment[] = htmlentities($attach['file']);
}
$attachment = implode(", ", $attachment);
and the function:
attachedFiles();
Thanks!