Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php find differences between two arrays


<?php
$array1 = array("a" => "green", "red", "blue", "red");
$array2 = array("b" => "green", "yellow", "red");
$result = array_diff($array1, $array2);

print_r($result);
?>

Array
(
    [1] => blue
)
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #find #differences #arrays
ADD COMMENT
Topic
Name
6+5 =