Now that is just f****ng weak.
Does your mother let you do that at home?
Really, I wonder who the hell would employ someone who used that crap in their code, muchless handed that out as a recommended method.
preg_match_all('/<tt>+(.*)</tt>/i',$str,$array);
//var $array now contains all text inside <tt></tt> throughout the file.
print_r($array);
...and this works far better than your entire lame ass function and much faster too.
Just say no to stringFunc Freaks!