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

DomElement->has_attribute()

DomElement->has_attribute - Checks to see if an attribute exists in the current node

Syntax

bool DomElement->has_attribute (string $name)

Arguments

  • name - The name of the tested attribute.

Description

This functions checks to see if an attribute named name exists in the current node.

Version

PHP 4.1.0

Return value

Returns TRUE if the asked attribute exists, FALSE otherwise.