Re: Array problem

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

 



On 27 October 2010 16:53, Don Wieland <donw@xxxxxxxxxxxxxxxxxx> wrote:
> Hi. I have question regarding an array:
>
> This is a print of a POST array from a form of mine:
>
> Array
> (
> Â Â[SelVol] => Array
> Â Â Â Â(
> Â Â Â Â Â Â[0] => ohontheledge@xxxxxxxxx
> Â Â Â Â Â Â[1] => donw@xxxxxxxxxxxxx
> Â Â Â Â)
>
> Â Â[id_Event] => 10
> Â Â[sDate] => 10/31/2010
> Â Â[Note] => FFF
> )
>
> I am trying to implode the Sel_Vol and it is not giving me the results I
> want.
>
> $BCC = implode(",", $_POST['Sel_Vol']);
>
> I want a comma separated result =
>
> $BCC = "ohontheledge@xxxxxxxxx,donw@xxxxxxxxxxxxx";
>
> Little help - pretty please
>
> Don Wieland

[2010/10/27 16:37:28] [Z:\] [\\richardquadling\scratch$ ] >php
<?php
$_POST = Array
(
   'SelVol' => Array
       (
           'ohontheledge@xxxxxxxxx',
           'donw@xxxxxxxxxxxxx',
       ),
   'id_Event' => 10,
   'sDate' => '10/31/2010',
   'Note' => 'FFF',
);

echo implode(',', $_POST['SelVol']);
?>

outputs ...

ohontheledge@xxxxxxxxx,donw@xxxxxxxxxxxxx

As Nicholas pointed out, the extra underscore in the key is the issue.
-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[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