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();