TheZach Posted May 14, 2011 Share Posted May 14, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/236384-php-simplexml-and-variables-help/ Share on other sites More sharing options...
TheZach Posted May 14, 2011 Author Share Posted May 14, 2011 er XML file is actually at http://codepad.org/MQeR2VBZ Quote Link to comment https://forums.phpfreaks.com/topic/236384-php-simplexml-and-variables-help/#findComment-1215287 Share on other sites More sharing options...
harristweed Posted May 14, 2011 Share Posted May 14, 2011 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"; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/236384-php-simplexml-and-variables-help/#findComment-1215289 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.