PHP getName() Function

Gets the name of the XML element.

public string SimpleXMLElement::getName ( void )

Example -

The above example will output:

movies

movie

ParameterDescription
numberThe numeric value to process

Return Values

The getName method returns as a string the name of the XML tag referenced by the SimpleXMLElement object.