array unique php by key code example
Example 1: remove duplicate value from array
let chars = ['A', 'B', 'A', 'C', 'B'];
let uniqueChars = [...new Set(chars)];
console.log(uniqueChars);
Example 2: unique key value array php
$input = array_map("unserialize", array_unique(array_map("serialize", $input)));