[ create a new paste ] login | about

Link: http://codepad.org/N1MmxybH    [ raw code | output | fork ]

PHP, pasted on Nov 9:
1
2
3
4
5
6
7
8
9
10
11
12
<?php

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

print_r($result);


  

?>


Output:
1
2
3
4
5
6
Array
(
    [b] => green
    [0] => yellow
    [1] => red
)


Create a new paste based on this one


Comments: