Función de rebobinado de PHP ()
Ejemplo
Rebobina hasta el primer elemento y luego devuélvelo (con 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());
?>
Definición y uso
La función rewind() rebobina hasta el primer elemento.
Sintaxis
SimpleXMLIterator::rewind()
Detalles técnicos
Valor devuelto: | Nada |
---|---|
Versión PHP: | 5.0+ |
❮ Referencia PHP SimpleXML