Home > PHP > Function > DOM XML (PHP 4) > DomElement->get_attribute()

DomElement->get_attribute()

DomElement->get_attribute - Returns the value of the given attribute

Syntax

string DomElement->get_attribute (string $name)

Arguments

  • name - The name of the seeked attribute. This parameter is case sensitive.

Description

Returns the value of the given attribute in the current element.

Version

PHP 4.1.0

Return value

Returns the name of the attribute as a string or an empty string if no attribute with the given name is found.