SimpleXMLIterator::key
Return current key
&reftitle.description;
public mixedSimpleXMLIterator::key
This method gets the XML tag name of the current element.
&reftitle.parameters;
&no.function.parameters;
&reftitle.returnvalues;
Returns the XML tag name of the element referenced by the current SimpleXMLIterator object or &false;
&reftitle.examples;
Get the current XML tag key
PHP basicsXML basics');
echo var_dump($xmlIterator->key());
$xmlIterator->rewind(); // rewind to the first element
echo var_dump($xmlIterator->key());
?>
]]>
&example.outputs;