note 121968 added to simplexmliterator.rewind
| From: | bmafzallmahmud at gmail dot com | Date: | Sat, 02 Dec 2017 21:06:22 +0000 |
| Subject: | note 121968 added to simplexmliterator.rewind | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209301@lists.php.net to get a copy of this message | ||
<?php
$note=<<<XML
<note>
<to>Afzall</to>
<from>Hasanuzzaman Sobuj</from>
<heading>Reminder</heading>
<body>Don't forget our friendship</body>
</note>
XML;
$xmlIterator = new SimpleXMLIterator($note);
echo "<pre>";
$xmlIterator->rewind(); // rewind means back to the beginning, thats mean prepare to first
element
var_dump($xmlIterator->rewind()); // but show NULL
var_dump($xmlIterator->current()); // see first element you must use" current()"
out put :
NULL
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.rewind.php
Edit -- https://master.php.net/note/edit/121968
Del: integrated -- https://master.php.net/note/delete/121968/integrated
Del: useless -- https://master.php.net/note/delete/121968/useless
Del: bad code -- https://master.php.net/note/delete/121968/bad+code
Del: spam -- https://master.php.net/note/delete/121968/spam
Del: non-english -- https://master.php.net/note/delete/121968/non-english
Del: in docs -- https://master.php.net/note/delete/121968/in+docs
Del: other reasons-- https://master.php.net/note/delete/121968
Reject -- https://master.php.net/note/reject/121968
Search -- https://master.php.net/manage/user-notes.php