主页
PHP
PHP attributes() 函数
demo_func_simplexml_attributes
运行 ❯
×
更改方向
保存代码
更改主题
<?php $note=<<
Tove
Jani
Reminder
Do not forget me this weekend! XML; $xml = simplexml_load_string($note); foreach($xml->body[0]->attributes() as $a => $b) { echo $a,'="',$b,"
"; } ?>