From 9ff471e9ace11c647fef53107ec4d2f8e81f75da Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Fri, 6 Feb 2004 17:39:57 +0000 Subject: [PATCH] a missing word + some CS (no, I'm not an addict) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@150640 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/simplexml/reference.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/reference/simplexml/reference.xml b/reference/simplexml/reference.xml index 75a497c44c..a074efe149 100644 --- a/reference/simplexml/reference.xml +++ b/reference/simplexml/reference.xml @@ -1,5 +1,5 @@ - + SimpleXML functions SimpleXML @@ -100,8 +100,8 @@ include 'example.php'; $xml = simplexml_load_string($xmlstr); /* For each node, we echo a separate . */ -foreach($xml->movie as $movie) { - echo $movie->plot,'
'; +foreach ($xml->movie as $movie) { + echo $movie->plot, '
'; } ?> @@ -115,8 +115,8 @@ foreach($xml->movie as $movie) { So far, we have only covered the work of reading element names and their values. SimpleXML can also access element attributes. - Access attributes of an element just as you would elements of - an array. + Access attributes of an element just as you would access elements + of an array. movie[0]->rating as $rating) { include 'example.php'; $xml = simplexml_load_string($xmlstr); -foreach($xml->xpath('//character') as $character) { - echo $character->name, 'played by ', $character->actor, '
'; +foreach ($xml->xpath('//character') as $character) { + echo $character->name, 'played by ', $character->actor, '
'; } ?> ]]>