DOMElement::setIdAttribute

(PHP 5, PHP 7)
Declares the attribute specified by name to be of type ID
public void DOMElement::setIdAttribute ( string $name, bool $isId )

Declares the attribute name to be of type ID.

Parameters:
name

The name of the attribute.

isId

Set it to TRUE if you want name to be of type ID, FALSE otherwise.

Returns:

No value is returned.

Exception:

Raised if the node is readonly.

Raised if name is not an attribute of this element.

See also:

DOMDocument::getElementById() -

DOMElement::setIdAttributeNode() -

DOMElement::setIdAttributeNS() -

doc_php
2016-02-24 16:14:50
Comments
Leave a Comment

Please login to continue.