Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mergeAndSort ($arr1, $arr2) {
- $arr1 = [1, 6, 2, 9];
- $arr2 = [10, 5, 1, 2];
- $result = array_unique(array_merge($arr1, $arr2));
- sort($result);
- return $result;
- }
- $arr1 = [1, 6, 2, 9];
- $arr2 = [10, 5,1,2];
- $result = mergeAndSort($arr1, $arr2);
- print_r($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement