Jump to content

PHP SimpleXML and Variables Help


TheZach

Recommended Posts

I am trying to find out how to merge the FIPS part of this XML file into one php variable with SimpleXML.

 

a sample xml file I'm trying to use is at http://server1.thezach.net/examplewarn.xml

 

basically i want a variable with "001033,001077" in it (without the quotes)

 

I'm new to PHP and this is my first time using this forum so please forgive me if I'm full of fail

Link to comment
https://forums.phpfreaks.com/topic/236384-php-simplexml-and-variables-help/
Share on other sites

does this point you in the right direction?

<?php
$xml_feed="http://server1.thezach.net/examplewarn.xml";
if($xml = simplexml_load_file("$xml_feed")){
foreach($xml->info->area->geocode as $number){
$value=$number->value;
echo"value = $value<br />\n";
    }
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.