- array_intersect: documentation ( source)
- print_r: documentation ( source)
<?php
$options = array(
'index1' => 'html',
'index2' => 'html',
'index3' => 'slide',
'index4' => 'tab',
'index5' => array(123),
);
$lookfor = array('slide', 'tab');
$found = array_intersect($options, $lookfor);
print_r($found);