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