neoform Posted February 12, 2008 Share Posted February 12, 2008 I'm using simplexml to parse a feed.. but I'm getting a very strange and annoying problem. print_r($this->Item->EditorialReviews); print_r($this->Item->EditorialReviews->EditorialReview); produces: SimpleXMLElement Object ( [EditorialReview] => Array ( [0] => SimpleXMLElement Object ( [source] => Product Description [Content] => 46" widescreen HDTV (16:9 aspect ratio) * high-gloss black finish * built-in digital (ATSC) and analog (NTSC) tuners for over-the-air TV broadcasts (antenna required) * built-in QAM cable TV tuner receives unscrambled programs without a set-top box (cable service required) * Super Clear LCD panel with semi-gloss screen (1920 x 1080 pixels) * ) [1] => SimpleXMLElement Object ( [source] => Amazon.com Product Description [Content] => For people looking to step up to full 1080p resolution in a 46-inch flat-panel LCD, Samsung's 2007 model LNT4665F is a good choice. Besides offering full 1080p resolution the LNT4665F also features a 15,000:1 dynamic contrast ratio for rich blacks and subltle tecture display, an 8ms response time panel for smooth motion, hidden side speakers, an NTSC tuner, and 3 HDMI ports. ) ) ) SimpleXMLElement Object ( [source] => Product Description [Content] => 46" widescreen HDTV (16:9 aspect ratio) * high-gloss black finish * built-in digital (ATSC) and analog (NTSC) tuners for over-the-air TV broadcasts (antenna required) * built-in QAM cable TV tuner receives unscrambled programs without a set-top box (cable service required) * Super Clear LCD panel with semi-gloss screen (1920 x 1080 pixels) * ) Why is the second result returning an object with 1 element and not an array with 2 elements? Quote Link to comment https://forums.phpfreaks.com/topic/90734-simplexmlelement-disapearing-elements/ 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.