Working With Unique Values

<?phpphp
  $countries = array( 'USA' => 'English', 'Spain' => 'Spanish',
                      'Brasil' => 'Portuguese', 'UK' => 'English',
                      'France' => 'French', 'Argentina' => 'Spanish');  $languages = array_unique($countries);
  printf("<pre>%s

\n”, var_export($languages, TRUE)); $languages = array_unique( array_values($countries) );
printf(“

%s

\n”, var_export($languages, TRUE)); $languages = array_values( array_unique($countries) );
printf(“

%s

\n”, var_export($languages, TRUE));
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.