array_combine modification
Posted: Sat Sep 23, 2006 11:55 pm
When I print_r($_POST) to determine what's being posted from my form, I get this:
Then, I array_combine to (duh) combine the arrays, and I get this:
I'd like to get this:
Anyone know how I can accomplish 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 )Code: Select all
Array ( [Joe] => Dog [] => )I'd like to get this:
Code: Select all
Array ( [Joe] => Dog [] => Cat)