<?$foo = '<title>Hello word</title>text test';preg_match("#<title>(.*?)</title>#U", $foo, $var);print_r($var);?>