PHP Merge values with same key
Posted: Fri Oct 14, 2011 8:52 pm
I was working on........something and I thought I'd tidy up the output a little bit.....*cough*
Anyways, I have two arrays like this,
So, any help on this?
Anyways, I have two arrays like this,
Array ( [0] => Zero [1] => One ) Array ( [0] => 0 [1] => 1 )But now, I want to output it like,
Array( [0] => Array( [0] => "Zero" [1] => 0 ) [1] => Array( [0] => "One" [1] => 1 ) )But I have no idea how I would merge the values with the same key, if that makes sense. I looked into array_merge which doesn't work. I also looked into array_merge_recursively which didn't seem to do anything different.
So, any help on this?