downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DomElement->tagname> <DomElement->set_attribute_node
Last updated: Fri, 13 Nov 2009

view this page in

DomElement->set_attribute

(PHP 4 >= 4.1.0)

DomElement->set_attribute 属性値を設定する

説明

DomAttribute set_attribute ( string $name , string $value )

名前 name を持つ属性値を value に設定します。

パラメータ

name

属性名。もし属性が存在しない場合、新たに作成されます。

value

属性値

返り値

古い DomAttribute ノード、 もしくは最初に属性が作成された場合は新しいノードを返します。

例1 属性を設定する

<?php
$doc 
domxml_new_doc("1.0");
$node $doc->create_element("para");
$newnode $doc->append_child($node);
$newnode->set_attribute("align""left");
?>

PHP 5 への移行

DOMElement::setAttribute を使用してください。



add a note add a note User Contributed Notes
DomElement->set_attribute
There are no user contributed notes for this page.

DomElement->tagname> <DomElement->set_attribute_node
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites