comparing 3 arrays and result in 1 array
Posted
by
frightnight
on Stack Overflow
See other posts from Stack Overflow
or by frightnight
Published on 2012-11-01T10:58:41Z
Indexed on
2012/11/01
11:00 UTC
Read the original article
Hit count: 171
php
i have 3 arrays, i want to get the result of those 3 arrays in one, but how can i deleted those same answer in a arrays?
here's my example:
<?php
$array1 = array("a" => "green", "red", "blue");
$array2 = array("b" => "green", "yellow", "red");
$array3 = array("c" => "white", "blue", "black");
$result = ??? ($array1, $array2, $array3);
print_r($result);
?>
Array
(
[0] => green
[1] => red
[2] => blue
[3] => yellow
[4] => red
[5] => white
[5] => black
)
please help me guys.. thank you..
© Stack Overflow or respective owner