I am using this code to extract field data from a thingspeak xml stream
$url = "https://api.thingspeak.com/channels/203731/feeds.xml?results=500";
$xml = simplexml_load_file($url);
$channel_name = $xml->name;
print_r($channel_name);
foreach ($xml->feeds as $feed) {
print_r($field1);
}
The channel_name displays but not the field1. I can't find answers on this site that specifically show extracting data from a type="array" within an xml file Here is the edited version of the xml returned from thingspeak that shows the feeds records " " Pothole Locations " " " 1.00 " 2.00 " " " 1.00 " 2.00 " " "