PHP next() လုပ်ဆောင်ချက်
ဥပမာ
ပထမဒြပ်စင်သို့ ပြန်လှည့်ပါ၊ နောက်ဒြပ်စင်သို့ ရွှေ့ပြီးနောက် ၎င်းကို current() လုပ်ဆောင်ချက်ဖြင့် ပြန်ပို့ပါ-
<?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());
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
next() function သည် နောက် element သို့ ရွှေ့သည်။
အထားအသို
SimpleXMLIterator::next()
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ဘာမှမဖြစ် |
---|---|
PHP ဗားရှင်း- | 5.0+ |
❮ PHP SimpleXML အကိုးအကား