array php remove duplicates
<?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 ) $str = implode(',',array_unique(explode(',', $str)));
Also in PHP:
- check composer using php version
- date show year first php
- create seede for table in laravel
- catch exception php of spetie
- create random username with numbers and letters php
- enable helper methods laravel 6
- clean routes cache laravel
- run php artisan cache:clear
- echo type php
- $table->set() type laravel migrations
- composer install laravel 7 not installing
- database seeding in laravel
- artisan laravel install
- codeigniter load form_validation
- check data type in php
- array function in php
- check php version linux terminal
- base64 decode encode online php
- Customizing The Validation Attributes
- codeigniter device
- acf auto increment field
- date format in php for AM PM
- convert string into non capital letters php
- date formate with pc time in php