array check duplicates php
<?php
$fruits_list = array('Orange', 'Apple', ' Banana', 'Cherry', ' Banana');
$result = array_unique($fruits_list);
print_r($result);
?>
Output:
Array ( [0] => Orange [1] => Apple [2] => Banana [3] => Cherry ) function has_dupes($array) {
$dupe_array = array();
foreach ($array as $val) {
if (++$dupe_array[$val] > 1) {
return true;
}
}
return false;
}
Also in PHP:
- check website ssl certificate using php
- command to install laravel 7
- convert dd/mm/yyyy to yyyy-mm-dd in mysql php
- filter only unique string in php
- $db php
- Warning: get_browser(): browscap ini directive not set in
- Pacific Daylight Time Zone php
- failed to clear cache. make sure you have the appropriate permissions. laravel
- Create a cron job php
- check if character in string php
- count charctor in php
- find strings that contain php
- creating new laravel project using composer
- composer won't use php version for subdomain multiphp
- blade if
- array de objetos php ejemplos
- ation: 1071 Specified key was too long; max key length is 1000 bytes
- determine with index has a value in php
- creating a laravel project with composer
- SOHW error details on php
- PHP Warning: Module 'soap' already loaded in Unknown on line 0
- composer install last laravel
- catch new exception php
- create random_str laravel