delete duplicate values 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 )
Also in PHP:
- contain string php
- create new file in folder php
- "this" in try catch in php
- array in array php foreach example
- array key exist
- error reporting 0 in hph
- echo json_encode json_pretty
- current uri php[
- exception php
- check array with name exists php
- Which of the following function returns the number of characters in a string variable?
- eloquent using last()
- add 15 days to date in loop php
- array sort unique laravel
- add seeder laravel
- find location from an ip address PHP
- dates phpp
- data type php display
- ? for types in php
- 'https://', 'www.' & all sub derictories reomve from a url with regex
- echo json php
- fatch time from database and add in current time in php
- create laravel project 7
- date and time function php