This is a bit sloppy, but here is a sample code on how to cycle through an array and grab the words that contain the letter 't':
<?php
// an array of words
$wordtest = array (
0 => "test",
1 => "aksdfka",
2 => "eirueoiuroi",
3 => "irtituiu",
4 => "tes");
//this for loop will cycle through the array
for ($a=0;$a<count($wordtest);$a++) {
//converts the word to lower case
$newword = strtolower($wordtest[$a]);
//if the first letter of word is 't'
//then print the word, else do nothing
if ($newword[0]=='t') {
echo "$newword<br>\n";
}
else {
//do nothing
}
}
?>