Php/docs/domelement.getattribute

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

DOMElement::getAttribute

(PHP 5, PHP 7)

DOMElement::getAttribute属性の値を返す


説明

public DOMElement::getAttribute ( string $name ) : string

現在のノードから、名前が name である属性の値を取得します。


パラメータ

name
属性の名前。


返り値

属性の値、あるいは name に対応する属性が 見つからなかった場合には空の文字列を返します。


参考