This merges two arrays, then will place them alphabetical order, by the key named ‘name’
1 2 3 4 5 6 7 8 |
$result2 = array_merge($resultb, $resulta); foreach ($result2 as $key => $row) { $new[$key] = $row['name']; } array_multisort($new, SORT_ASC, $result2); |