I am using PHP and I have an array of user images that I need to filter. I need to do 2 different filters:
- Look in original array and see if each value contains a value in my "bad words" array
 - Look and see if the value in the original array ends in one of "bad extensions" values
 
Images Array:
Array  
(  
    [0] => smiles.gif  
    [1] => kittens.jpg  
    [2] => biscuits.png  
    [3] => butthead.jpg  
)  
$bad_words = array('beavis','butthead','winehouse');  
$bad_extensions = array('.gif','.tiff');
I would like it to return:
Array  
(  
    [0] => kittens.jpg  
    [1] => biscuits.png  
)