PHP
<?php $toppings1 = array("Pepperoni", "Cheese", "Anchovies", "Tomatoes"); $toppings2 = array("Ham", "Cheese", "Peppers"); $inttoppings = array_intersect($toppings1, $toppings2); $difftoppings = array_diff($toppings1, $toppings2); $bothtoppings = array_merge($toppings1, $toppings2); var_dump($inttoppings); var_dump($difftoppings); var_dump($bothtoppings); ?>
16 of 33