I've been trying for a while now to do this, but I can't quite get it right.
How can I write a function that has an array of a couple of words and then use preg_match
to see if a variable starts with one of the words in the array?
This isn't right, but it might give an idea of what I mean.
$pre = array('the', 'or');
$pre2 = '/^[$pre]/';
if preg_match($pre2, $prefix)
I also want to make case insensitive. /i