> The question is how to perform intersection on the following structure:
>
> $products =
> array(array("green","red","blue"),array("green","yellow","red"),array("green","red","purple"),array("green","red","yellow"));

If I understood you correctly ..

<?php
$arr = array();
$arr[] = array("green", "red", "blue");
$arr[] = array("green", "yellow", "red");
$arr[] = array("green", "red", "purple");
$arr[] = array("green","red","yellow");
var_dump($arr);
// you could also ..
$arr = array();
array_push(
        $arr, array("green", "red", "blue"),
        array("green", "yellow", "red"),
        array("green", "red", "purple"),
        array("green","red","yellow")
);
var_dump($arr);
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to