//xml string
$xml_string="
//load the xml string using simplexml
$xml = simplexml_load_string($xml_string);
//loop through the each node of user
foreach ($xml->user as $user)
{
//access attribute
echo $user['id'], ' ';
//subnodes are accessed by -> operator
echo $user->name, ' ';
echo $user->email, '
';
}
这里是摘自本站之前发布的文章。更多的技巧可以参考。
收集的二十一个实用便利的PHP函数代码
<script type="text/javascript">
$("con_da1").innerHTML=$("con_tj_tp").innerHTML;
$("con_tj_tp").innerHTML="";
$("con_da8").innerHTML=$("con_da8_tp").innerHTML;
$("con_da8_tp").innerHTML="";
</script>
php免费学习视频:立即使用
踏上前端学习之旅,开启通往精通之路!从前端基础到项目实战,循序渐进,一步一个脚印,迈向巅峰!










