欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

PHP attributes()函數(shù)講解

 更新時間:2019年02月03日 09:46:34   作者:php參考手冊  
今天小編就為大家分享一篇關于PHP attributes()函數(shù)講解,小編覺得內(nèi)容挺不錯的,現(xiàn)在分享給大家,具有很好的參考價值,需要的朋友一起跟隨小編來看看吧

PHP attributes() 函數(shù)

實例

返回 XML 的 body 元素的屬性和值:

<?php 
$note=<<<XML
<note> 
<to>Tove</to> 
<from>Jani</from> 
<heading>Reminder</heading> 
<body date="2013-01-01" type="private">Don't forget me this weekend!</body> 
</note> 
XML;
$xml=simplexml_load_string($note); 
foreach($xml->body[0]->attributes() as $a => $b) 
{ 
echo $a,'="',$b,""<br>"; 
} 
?>

定義和用法

attributes()函數(shù)返回 XML 標簽的屬性和值。

語法

attributes( _ns,is_prefix_ );

總結(jié)

以上就是這篇文章的全部內(nèi)容了,希望本文的內(nèi)容對大家的學習或者工作具有一定的參考學習價值,謝謝大家對腳本之家的支持。如果你想了解更多相關內(nèi)容請查看下面相關鏈接

相關文章

最新評論