Php/docs/domelement.hasattribute

提供:Dev Guides
< Php
移動先:案内検索

DOMElement::hasAttribute

(PHP 5, PHP 7)

DOMElement::hasAttribute属性が存在するかどうかを調べる


説明

public DOMElement::hasAttribute ( string $name ) : bool

要素のメンバとして name という名前の属性が 存在するかどうかを示します。


パラメータ

name
要素名。


返り値

成功した場合に true を、失敗した場合に false を返します。


参考