From cbc44b26f37ca1929daa8a149722f95a88df62d8 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Thu, 26 Jan 2012 15:32:15 +0000 Subject: [PATCH] Wrong variable name, pointed out by Simon Harper git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322827 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/simplexml/examples.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/simplexml/examples.xml b/reference/simplexml/examples.xml index df00dbb2b6..bc3f6b5b6e 100644 --- a/reference/simplexml/examples.xml +++ b/reference/simplexml/examples.xml @@ -137,7 +137,7 @@ Mr. Coder played by El ActÓr - Properties ($xml->movie in previous example) are not + Properties ($movies->movie in previous example) are not arrays. They are iterable and accessible objects. @@ -340,7 +340,7 @@ $character = $movies->movie[0]->characters->addChild('character'); $character->addChild('name', 'Mr. Parser'); $character->addChild('actor', 'John Doe'); -$rating = $xml->movie[0]->addChild('rating', 'PG'); +$rating = $movies->movie[0]->addChild('rating', 'PG'); $rating->addAttribute('type', 'mpaa'); echo $movies->asXML();