Page 1 of 1

array_combine modification

Posted: Sat Sep 23, 2006 11:55 pm
by jjfletch
When I print_r($_POST) to determine what's being posted from my form, I get this:

Code: Select all

Array ( [name] => Array ( [0] => Joe [1] => [2] => [3] => [4] => [5] => ) [animal] => Array ( [0] => Dog  [1] => Cat [2] => [3] => [4] => [5] => ) [submit] => Validez )
Then, I array_combine to (duh) combine the arrays, and I get this:

Code: Select all

Array ( [Joe] => Dog [] => )

I'd like to get this:

Code: Select all

Array ( [Joe] => Dog [] => Cat)
Anyone know how I can accomplish this?

Posted: Sun Sep 24, 2006 12:27 am
by aaronhall
Maybe you should take a different approach in determining what's being posted to your script. What exactly did you need to know about the $_POST information, and what do you want to do with that information?