delete dduplicated from array 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 ) $counts = array_count_values($array);
$duplicate_title = array_filter($array, function ($value) use ($counts) {
return $counts[$value] > 1;
});
Also in PHP:
- check string in php
- base64 to string pp
- check php version linux terminal
- convert small to capital in php
- cache and compile file clear laravel
- create symfony project
- clear cache route laravel
- refresh php
- extend php maximum execution time
- @for loop php
- create seede for table in laravel
- convert date and time to timestamp php
- Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 9263312 bytes) in /home/arsalan farooq/local security.uk/wp-includes/wp-db.php
- check string if contains php
- count charcter in php
- add 10 days to date in php
- CONVERT STRING TO DECIMAL php
- export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH
- end session variable php
- exception type php
- blood groups laravel seeder
- Make database seeder run once laravel
- eloquent pluck multiple columns
- disab;e error reporting php