PHP 되감기() 함수
예시
첫 번째 요소로 되감고 다음 요소를 반환합니다(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());
?>
정의 및 사용
rewind() 함수는 첫 번째 요소로 되감습니다.
통사론
SimpleXMLIterator::rewind()
기술적 세부 사항
반환 값: | 아무것도 |
---|---|
PHP 버전: | 5.0+ |
❮ PHP SimpleXML 참조