Voting

: max(six, one)?
(Example: nine)

The Note You're Voting On

Prakashgun
7 years ago
If duplicate value comes in the first array, that will be also included. See in the output "blue" comes twice.

<?php

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

print_r($result);

//Output
//Array ( [1] => blue [3] => blue )

<< Back to user notes page

To Top