PHP अगला () फ़ंक्शन
उदाहरण
पहले तत्व पर रिवाइंड करें, अगले तत्व पर जाएँ और फिर इसे करंट () फ़ंक्शन के साथ लौटाएँ:
<?php
$note=<<<XML
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Do not forget me this weekend!</body>
</note>
XML;
$xml = new SimpleXMLIterator($note);
// rewind to the first element
$xml->rewind();
// move to the next element
$xml->next();
//
return current element
var_dump($xml->current());
?>
परिभाषा और उपयोग
अगला () फ़ंक्शन अगले तत्व पर जाता है।
वाक्य - विन्यास
SimpleXMLIterator::next()
टेक्निकल डिटेल
प्रतिलाभ की मात्रा: | कुछ भी तो नहीं |
---|---|
पीएचपी संस्करण: | 5.0+ |
❮ PHP SimpleXML संदर्भ