I am using DOMxPath to retrieve the data inside of an element from an xml file...
$xml = file_get_contents('data.xml');
$dom = new DOMDocument();
@$dom->loadHTML($xml);
$domx = new DOMXPath($dom);
$entries = $domx->evaluate("//observation_time");
$arr = array();
foreach ($entries as $entry) {
$ar6 = $entry->nodeValue;
}
echo "$ar6";
}
here is the xml
<observation_time>Last Updated on Dec 1 2011, 6:47 pm EST</observation_time>
the output is: Last Updated on Dec 1 2011, 6:47 pm EST
My question is: How do i pull only the date out of this string? using find?