note 121966 added to simplexmliterator.current
| From: | bmafzallmahmud at gmail dot com | Date: | Sat, 02 Dec 2017 05:51:06 +0000 |
| Subject: | note 121966 added to simplexmliterator.current | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209299@lists.php.net to get a copy of this message | ||
<?php
$note=<<<XML
<note>
<to>Afzall</to>
<from>Hasan</from>
<heading>Reminder</heading>
<body>Don't forget your parents</body>
</note>
XML;
$xmlIterator = new SimpleXMLIterator($note);
var_dump($xmlIterator->current()); //out put : NULL
var_dump($xmlIterator->rewind()); //out put null
$xmlIterator->rewind(); //beacse of rewind to first element then show
"$xmlIterator->current()""
var_dump($xmlIterator->current());
//out put : object(SimpleXMLIterator)#2 (1) { [0]=> string(6) "Afzall" }
?>
----
Server IP: 208.43.231.9
Probable Submitter: 103.202.223.116
----
Manual Page -- http://php.net/manual/en/simplexmliterator.current.php
Edit -- https://master.php.net/note/edit/121966
Del: integrated -- https://master.php.net/note/delete/121966/integrated
Del: useless -- https://master.php.net/note/delete/121966/useless
Del: bad code -- https://master.php.net/note/delete/121966/bad+code
Del: spam -- https://master.php.net/note/delete/121966/spam
Del: non-english -- https://master.php.net/note/delete/121966/non-english
Del: in docs -- https://master.php.net/note/delete/121966/in+docs
Del: other reasons-- https://master.php.net/note/delete/121966
Reject -- https://master.php.net/note/reject/121966
Search -- https://master.php.net/manage/user-notes.php