array_unique php array in array
<?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:
- easy admin bunfle symfony modify login page
- catch exception in php
- close connection pdo
- create seeders in laravel 8
- date one dat
- Your Composer dependencies require the following PHP extensions to be installed: fileinfo
- check if a key in an array exist ph
- How to create WordPress users programmatically
- Laravel Blade Foreach If Empty or Not
- display al errros php
- capital letter php
- error_reporting function not working
- automatic date on php
- PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Sp ecified key was too long; max key length is 1000 bytes")
- csv to json php
- current date string in php
- check php variable type
- console value in php
- drop down php form retrieve data from database
- fetch data from phpmyadmin
- add 1 month to date php
- check string on string php
- convert string to int php 7
- create random username with numbers and letters php