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