array unique in php using a column
<?php
$input = array("a" => "green", "red", "b" => "green", "blue", "red");
$result = array_unique($input);
print_r($result);
?>
Array
(
[a] => green
[0] => red
[1] => blue
)$input = array_map("unserialize", array_unique(array_map("serialize", $input)));
Also in PHP:
- console.php
- !php.net date
- error reporting php all
- * in array key php
- display php errors on page
- dompdf/dompdf v1.0.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- composer laravel app
- Codeigniter count query results
- date time H:i:s in php
- codeigniter select for update
- check typo of variable php
- check if array contains a key php
- clear the saved cache of my laravel websitefor all the users
- checking php version
- beforeHeader settings
- find php
- check if substring present in string in php
- date( c time()) php
- display error php linux
- Making visible or hidden attributes from Eloquent temporarily
- check array in array key
- How to check if fwrite failed php
- db seed
- explode in php