男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

SimpleXMLElement::attributes

(PHP 5, PHP 7, PHP 8)

SimpleXMLElement::attributesIdentifies an element's attributes

說(shuō)明

public SimpleXMLElement::attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false): ?SimpleXMLElement

This function provides the attributes and values defined within an xml tag.

注意: SimpleXML 建起了一個(gè)給大多數方法添加迭代屬性的規則。不能通過(guò)使用 var_dump() 或任何可檢查對象的其它東西來(lái)查看。

參數

namespaceOrPrefix

An optional namespace for the retrieved attributes

isPrefix

Default to false

返回值

Returns a SimpleXMLElement object that can be iterated over to loop through the attributes on the tag.

Returns null if called on a SimpleXMLElement object that already represents an attribute and not a tag.

范例

示例 #1 Interpret an XML string

<?php
$string 
= <<<XML
<a>
 <foo name="one" game="lonely">1</foo>
</a>
XML;

$xml simplexml_load_string($string);
foreach(
$xml->foo[0]->attributes() as $a => $b) {
    echo 
$a,'="',$b,"\"\n";
}
?>

以上例程會(huì )輸出:

name="one"
game="lonely"

參見(jiàn)

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站