Merge two numerically-keyed associative arrays and preserve the original keys
Just use: $output = array_merge($array1, $array2); That should solve it. Because you use string keys if one key occurs more than one time (like ’44’ in your example) one key will overwrite preceding ones with the same name. Because in your case they both have the same value anyway it doesn’t matter and it will … Read more