Created
November 30, 2011 19:10
-
-
Save whyisjake/1410353 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SimpleXMLElement Object | |
( | |
[Products] => Array | |
( | |
[0] => SimpleXMLElement Object | |
( | |
[AutoDropShip] => N | |
[DoNotAllowBackOrders] => N | |
[LastModBy] => 287 | |
[LastModified] => 12/21/2010 2:18:00 PM | |
[ProductCode] => GFT | |
[ProductID] => 1 | |
[ProductName] => Gift Certificate | |
[StockStatus] => 8287 | |
[ProductDescription] => Can't decide what to get your favorite Maker, Crafter or Hacker? Give them a gift certificate good for anything from the Maker Shed with the amount you choose. | |
[...] | |
print_r($xml); //Gives me the above | |
$products = $xml->products; | |
print_r($products); // Gives me... SimpleXMLElement Object () | |
foreach ($products as $product) { | |
echo $product->ProductName; | |
} | |
//Would think that I would get a big list of product names here... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment