PHP key() Function

PHP SimpleXML Reference : Rewind to the first element and return the current key (which is the XML tag name of the current element)

Definition and Usage

The key() function returns the current key (which is the XML tag name of the current element).

Syntax

SimpleXMLIterator::key()

Technical Details

Return Value: The XML tag name of the current element on success. FALSE otherwise
PHP Version: 5.0+

❮ PHP SimpleXML Reference