problems imploding variables, please help!
| From: | Sandeep Hundal | Date: | Mon, 14 May 2001 12:39:51 +0000 |
| Subject: | problems imploding variables, please help! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-52688@lists.php.net to get a copy of this message | ||
hi all,
i'm trying to write a mail application that i will be releasing soon for
people to download, but i've hit a slight bug / problem.
i have an index file with email addresses listed alongside names. each email
address has a checkbox which look something like this:
------------------------------
<td><input type="checkbox" name="emailto[]"
value="$email"></td>
<td><input type="checkbox" name="emailcc[]"
value="$email"></td>
<td><input type="checkbox" name="emailbcc[]"
value="$email"></td>
------------------------------
all $email are pulled out of mysql by the way.
anyway, so since these go into an array, i have this code in the next page :
--------------------------------
if ($emailto) { $to_list = implode(" , ",$emailto); }
if (isset($emailcc)) { $cc_list = implode(" , ",$emailcc); }
if (isset($emailbcc)) { $bcc_list = implode(" , ",$emailbcc); }
--------------------------------
but when i have all three checboxes ticked (so i can fill up the To: CC: and
BCC: fields) for all my emails, then it gives me this error:
--------------------------------
Warning: Bad arguments to implode() in email.php on line 27
--------------------------------
any idea of what mistake i'm making?? the code fills up my CC: and BCC:
fields, but not the TO: fields... :(
TIA!
/sunny