I have two arrays, both have the same keys (different values) however array #2 is in a different order. I want to be able to resort the second array so it is in the same ord
foreach(array_keys($array1) as $key) { $tempArray[$key] = $array2[$key]; } $array2 = $tempArray;