DOMElement::getAttribute
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Returns value of attribute
Description
DOMElement::getAttribute(string $qualifiedName): string
Gets the value of the attribute with name qualifiedName for the current node.
Parameters
qualifiedNameThe name of the attribute.
Return Values
The value of the attribute, or an empty string if no attribute with the given qualifiedName is found.
See Also
DOMElement::hasAttributeDOMElement::setAttributeDOMElement::removeAttribute