Created
February 9, 2023 16:48
-
-
Save chrishieu/99da8599b7fd5f4690201ba05c8139ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a1=array('Ava', 'Emma', 'Olivia'); | |
$a2=array('Olivia', 'Sophia', 'Emma'); | |
function unique_names ($a1, $a2) { | |
return (array_unique(array_merge($a1,$a2), SORT_REGULAR)); | |
} | |
print_r(unique_names($a1, $a2)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment