strpos($words, $a, 0) will return -1 if it's not in there, or an integer of the first character if it is. HEnce, you can use this:
if(strpos($words, $a, 0) != -1)
(just so you know, the 0 parameter is a starting position... if you wanted to ignore any results before a certain point, you would make it a positive integer.)