[PHP] Correct handling _POST[] and implode. PHP5

2009-10-08 Thread bearsfoot
Hi all, I have a form that has has an array of information. Mulitple checkboxes can be selected. Choose the colors: Green Yellow Red Gray When processing the form.. echo $_POST['Colors'] . ''; // outputs 'Array' if ( isset($_POST['Colors']) ) { $_POST['Colors'] = implode(', ', $_PO

RE: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread bearsfoot
Hi Andrea, Thanks for your responses. The output from echo '', var_dump($_POST['Colors']), ''; is --> string(5) "Array" I am using php version 5.2.10. It is strange that you posted the same array and ran the implode function ok ? That has me baffled. I am several forms within the applicat

RE: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread bearsfoot
I just realised I have get_magic_quotes_gpc turned on and was not catering for arrays. Thanks for your time. Adam Andrea Giammarchi-3 wrote: > > > >> so it's simple, it's not an array, but your assignment magically makes it >> an array since you wrote "iterate over the array" ... very, very