Re: SimpleXML/array duality (like particles & waves)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 28 Sep 2010, Brian Dunning wrote:
> I am kind of jacked here. I have a SimpleXML object that's been
> converted to an array. In one of the nodes, for no reason I can see,
> the array is populated differently if there is only one <order_item>
> than if there are multiple <order_item>s.
>
> [...]
>
> In case it matters, here is that snip of what the original XML looks
> like, it's all good: 
> <?xml version="1.0" encoding="UTF-8"?>
> <order xmlns="http://xxxx.com/xxxx"; version="1.0">
>   <order_items>
>     <order_item>
>       <order_item_product_code finish="glossy">1060</order_item_product_code>
>       <order_item_description>4x5.3 trueDigital print(s)</order_item_description>
>     </order_item>
>     <order_item>
>       <order_item_product_code finish="glossy">1300</order_item_product_code>
>       <order_item_description>4x8 photo cards (set of 20)</order_item_description>
>     </order_item>
>   </order_items>
> </order>

What does the XML look like if there's only one order item?  Maybe
you're losing a level of nesting there?

-- 
Erik Arneson <dybbuk@xxxxxxxxx>
  GPG Key ID : 1024D/62DA1D25   BitCoin : 1LqvuGUqJ4ZUSoE7YE9ngETjwp4yZ2uSdP
      Office : +1.541.291.9776    Skype : callto://pymander
            http://www.leisurenouveau.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux