I'm having trouble getting a regexp in PHP to work. It's supposed to get the string between the tags on a web page, but all I get in return is the word Array when I try to echo it.
This is the text I'm using the regexp on. It's part of a web page downloaded as a string.
<title>
HTC Desire S
</title>
This is the code I'm using for the regular expression.
while(!feof($list_of_phones))
{
$phone = fgets($list_of_phones);
$info = file_get_contents($phone);
preg_match_all("/\/<title>(.*)<\/title>/", $info, $title, PREG_OFFSET_CAPTURE);
echo $title[0];
}