array find 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:
- Laravel Google Line Chart
- acf looping through post types
- cash clear laravel
- $s->$h php code
- column of csv to array php
- composer which php version
- check if word belongs in string
- console print in php
- Class 'App\Http\Controllers\Auth' not found
- How do you clear cache in Laravel?
- display page template using functions.php
- create controller in laravel command line
- check if substring is present in string php
- WooCommerce Catalog Mode snippets
- create laravel project using cmd
- count number of characters php
- create laravel 6 project
- debug native php
- delete cache file laravel
- date format c php
- check array key exists php js
- count number of char in a string php
- current time not current date php
- clear database cache laravel command