If you just need the count of substring matches, look at substr_count(), otherwise if you want to extract the word containing that pattern, then you need to use a regular expression, e.g.:
$regex = "/\W+(th\w+)\W+/";
$str = "I like this and that and those too";
preg_match_all($regex, $str, &$reg);
print_r($reg);
As you can see the $reg[1] array will contain all the matched words.
Check the PCRE and POSIX regular expression functions in the manual for more info.