Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to get array dont similer elements in php

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

//result
Array
(
    [a] => green
    [0] => red
    [1] => blue
)
Comment

PREVIOUS NEXT
Code Example
Php :: alert php 
Php :: how to add property to the request object in laravel 
Php :: unset _post 
Php :: Making visible or hidden attributes from Eloquent temporarily 
Php :: In php, how to convert string value into an int 
Php :: php get class name of this 
Php :: php implode as key value of object 
Php :: laravel redirect back 
Php :: php artisan make migrate different folder 
Php :: constructor in php 
Php :: laravel json response decode 
Php :: php ip 
Php :: yii2 a href confirm 
Php :: artisan call migrate result 
Php :: php array to js 
Php :: PHP auto refresh page 
Php :: php append file 
Php :: $posts- links() laravel design error 
Php :: laravel save relationship to authorized user with parameter 
Php :: get user symfony 
Php :: import session laravel 
Php :: php function argument spicific types array check 
Php :: php string ends with 
Php :: laravel s3 presigned url 
Php :: decode utf-8 php 
Php :: set null on foreign key deletion in laravel 
Php :: /laravel-2020-07-27.log" could not be opened 
Php :: how to catch query exception in laravel 8 
Php :: contact form 7 select disabled option 
Php :: pdo fetchall as object 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =