I am wondering how to parse the values ββin XML that seem to have: on their behalf. I used:
$response = file_get_contents($url);
$data = simplexml_load_string($response);
then do:
foreach($data->item as $key => $current){
However, one of the last feeds I received has colons in the feed name, as shown in the example below:
<item>
<title>foo</title>
<description>foo</description>
<ccc:fid>10</ccc:fid>
<ccc:bid>6</ccc:bid>
</item>
When I try to create $ current-> ccc: php rate does not get to happiness (rightfully). Is there any way around this?
source
share