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

search for in the

DomElement->set_attribute_node> <DomElement->has_attribute
Last updated: Fri, 06 Nov 2009

view this page in

DomElement->remove_attribute

(PHP 4 >= 4.1.0)

DomElement->remove_attribute 属性を削除する

説明

bool remove_attribute ( string $name )

現在の DomElement ノードから属性を削除します。

パラメータ

name

削除する属性名

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

PHP 5 への移行

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



add a note add a note User Contributed Notes
DomElement->remove_attribute
fpiat / bigfoot com
19-Apr-2006 06:38
<?php
/* Remove all attribute from a node */
foreach ($node->attributes() as $attr)
       
$node->remove_attribute($attr);
/* Then rename that tag */
$node->set_name('div');
/* And set appropriate "class" attribute */
$node->set_attribute('class','paragraphBox');
?>

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