Re: implode()
| From: | Dan Shirah | Date: | Tue, 18 Nov 2008 15:02:08 +0000 |
| Subject: | Re: implode() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283455@lists.php.net to get a copy of this message | ||
On 11/18/08, Terion Miller <webdev.terion@gmail.com> wrote:
>
> I have read the whole forum at php.net on implode and I still don't get
> why
> this one does not work
>
> if (isset($_POST['BannerSize'])){$BannerSize =
> implode($_POST['BannerSize'],',');} else {$BannerSize = "";}
>
> someone please help
>
You appear to have it backwards? Using implode() you should have your
"glue" (the value you want to identify to implode on) before your $variable.
It looks like you are trying to implode on a comma, correct? So using the
proprer format of implode(glue,variable) you should so something like:
implode(',',$_POST['BannerSize']);
Dan