$items1 = ['apple', 'tree', 'juice'];
$items2 = ['apple', 'tree'];
$items3 = ['apple'];
// loop
If ($items[i].containsOnly['apple'])
{
// do something..
}
In the simplified example above I want to get the array that matches the given item. Is there a method available similar to 'containsOnly'? Or what is the best way to do this?