note 56442 deleted from ref.simplexml by didou

From: Date: Tue, 16 Jan 2007 00:53:33 +0000
Subject: note 56442 deleted from ref.simplexml by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121771@lists.php.net to get a copy of this message
Note Submitter: mmacadams at casslin dot com ---- it's important to note that PHP seems to disregard to first "all encompassing" tag... for example: $xmlstr="<order> <billing_name>Matt</billing_name> <billing_address>123 Main St.</billing_address> </order>"; the 'billing_name' would be accessed by: $xml = simplexml_load_string($xmlstr); $billing_name = $xml->billing_name; NOT: $xml = simplexml_load_string($xml); $billing_name = $xml->order->billing_name; Maybe I'm just an idiot, but this took me a few hours to figure out.. (Partly due to the similiarity between the words "movie" and "movies" in the Movie example at the top of the page) haha hope this helps save someone some time! :)

« previous php.notes (#121771) next »