array distint 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 ) <?php
$input = array("a" => "green", "red", "b" => "green", "blue", "red");
$result = array_unique($input);
print_r($result);
?>
Array
(
[a] => green
[0] => red
[1] => blue
)
Also in PHP:
- does include reload the page php
- Install or enable PHP's dom extension.
- Malformed UTF-8 characters, possibly incorrectly encoded
- decodeString php
- composer require laravel/ui for laravel 6
- current day + one day php
- find base64 inside of string php
- creating new project laravel
- codeigniter
- allow extension image chrome, firefox
- all uppercase php
- connt string php
- The main error reporting flags include
- date 'F' what is it
- datetime format laravel
- In PHP, the keyword __________ triggers the exception-handling mechanism.
- error php display
- calculate total time from start and end datetime in php
- associative array reverse php
- data php format
- check in array key true or false php
- clear laragon cache
- eloquent model sort by ascending order
- echo json_encode json_pretty