Answers for "associative array in one key in value must unique in array check in php"

PHP
1

array_unique

<?php
$input = array("a" => "green", "red", "b" => "green", "blue", "red");
$result = array_unique($input);
print_r($result);
?>

Array
(
    [a] => green
    [0] => red
    [1] => blue
)
Posted by: Guest on May-26-2020

Code answers related to "associative array in one key in value must unique in array check in php"

Browse Popular Code Answers by Language