DOMElement::removeAttribute
(PHP 5, PHP 7, PHP 8)
DOMElement::removeAttribute — Removes attribute
Description
$qualifiedName
): bool
Removes attribute named qualifiedName
from the element.
Parameters
-
qualifiedName
-
The name of the attribute.
Return Values
Returns true
on success or false
on failure.
Errors/Exceptions
-
DOM_NO_MODIFICATION_ALLOWED_ERR
-
Raised if the node is readonly.
See Also
- DOMElement::hasAttribute() - Checks to see if attribute exists
- DOMElement::getAttribute() - Returns value of attribute
- DOMElement::setAttribute() - Adds new or modifies existing attribute