I'm trying to check if an array doesn't have other values than the other but in_array() didn't worked so I guess it can't be done with in_array();
for example
<?php
$arr1 = array(1,2,3,4,5,6);
$arr2 = array(1,2,9);
if(/*all values in $arr2 are in $arr1*/){
/*return true*/
}
else{
/*return false*/
}
/*this examle should return false*/
?>
or
<?php
$arr1 = array(1,2,3,4,5,6);
$arr2 = array(1,2,6);
if(/*all values in $arr2 are in $arr1*/){
/*return true*/
}
else{
/*return false*/
}
/*this examle should return true*/
?>
how can I do this?