I have this XML I am trying to parse: http://rss.desura.com/games/feed/rss.xml?cache=sale
Inside it has this:
<saleprices>
<price currency="USD">6.79</price>
<price currency="AUD">6.79</price>
<price currency="EUR">5.09</price>
<price currency="GBP">4.42</price>
</saleprices>
Normally using simplexml in php for a tag you would use something like $game->{'price'} for example, but how do I pick out specific ones like USD from that list? i haven't worked with an XML that has strings inside a tag before.
I am loading and reading the XML like this:
$url = 'http://rss.desura.com/games/feed/rss.xml?cache=sale';
$xml = simplexml_load_string(file_get_contents($url));
foreach ($xml->browse->game as $game)
{