PHP 手冊
上一頁 |  | 下一頁

# DOMDocument->createElement

(no version information, might be only in CVS)

DOMDocument->createElement -- Create new element node

## Description

object DOMDocument->createElement ( string name [, string value])

This function returns a new instance of class DOMElement. The tag name of the element is the value of the name parameter. Optionally, a value for the new element may also be passed in. This node will not show up in the document unless it is inserted with e.g. DOMNode->appendChild().

The return value is `FALSE` if an error occurred.

See also DOMDocument->createElementNS(), DOMNode->appendChild(), DOMDocument->createTextNode(), DOMDocument->createComment(), DOMDocument->createAttribute(), DOMDocument->createProcessingInstruction().

上一頁 | 最開頭 | 下一頁
DOMDocument->createDocumentFragment | 上一層 | DOMDocument->createElementNS