, . , , cURL $xmlStr .
$push = array();
$foo = simplexml_load_string($xmlStr);
foreach($foo->zipcoderadius->zipcodes->id as $bar) {
array_push($push, (string)$bar);
}
print_r($push);
:
Array
(
[0] => 75969
[1] => 75970
[2] => 75971
)
: SimpleXML :
object(SimpleXMLElement)#1 (1) {
["zipcoderadius"]=>
object(SimpleXMLElement)#4 (1) {
["zipcodes"]=>
object(SimpleXMLElement)#3 (32) {
["id"]=>
array(3) {
[0]=>
string(5) "75969"
[1]=>
string(5) "75970"
[2]=>
string(5) "75971"
}
["zipcode"]=>
array(3) {
[0]=>
string(5) "94945"
[1]=>
string(5) "94945"
[2]=>
string(5) "94945"
}
...