Re: implode()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/18/08, Terion Miller <webdev.terion@xxxxxxxxx> 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux