|
hmm .. there's probably xml feeds on that stuff .. ya think?
with the ecommerce stuff, i'm using the following method to extract xml data into variables.
<?
$string="<somexml>somethinghere</somexml><temperature>72</temperature>";
$startpos = strpos($string, "<temperature>");
$endpos = strpos($string, "</temperature>");
$temperature = substr($string, $startpos, $endpos - $startpos);
echo "The current temperature is: $temperature";
?>
now the variable $temperature = 72;
you probably already knew that, but i just learned it last week. do you know of any better way to parse xml? i know that php has some xml functions, .. but it isn't that clear what they do.
|