Posts Tagged with unique array

Displaying 1-2 of 2 results.
Resolved: PHP remove same values from two arrays
posted by admin on April 5, 2016
I have two arrays
1.

$array1 = array("a" => "green", "red", "blue", "red");


2.

$array2 = array("b" => "green", "yellow", "red");


I want to compare values, and get new array with unique elements.
Result

Array
(
[1] => blue
)
Read more
Resolved: PHP remove duplicate elements from array - unique array
posted by admin on April 4, 2016
I have array

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


I want compose unique array from my array, without same duplicate valuesRead more