I am grabbing some xml data in a variable. I am trying to grab some data in between tags. I thought I would do something like this:
$newaddress = htmlspecialchars(file_get_contents($address));
echo $newaddress;
$pattern = "<coordinates>(.*)</coordinates>";
if (eregi($pattern, $newaddress, $title)){
break;
}
if ($title) {
$title = strip_tags($title[0]);
print $title;
}
I do not get any other output other than the original echo of newaddress. What am I doing wrong. I feel pretty stupid that I cannot figure this out.