我有一个这样的数组,我通过 SQL 查询得到它
Array
(
[0] => Array
(
[iId] => 1
[sName] => Tom
)
[1] => Array
(
[iId] => 2
[sName] => Jhon
)
)
然后通过这个数组,我正在创建 POST 请求,并返回 XML 对象
SimpleXMLElement Object
(
[@attributes] => Array
(
[method] => userstats_xml
[version] => 2.0
)
[userstats] => SimpleXMLElement Object
(
[type] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[id] => 2
)
[test] => SimpleXMLElement Object
(
[output] => 1280
)
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[id] => 1
)
[test] => SimpleXMLElement Object
(
[output] => 6112
)
)
)
)
)
现在我正在尝试获取下面列出的数组,因为我可以分别从第一个数组和 xml 对象输出数据,但我需要在一行中完成,例如
<a href="sId">sName - volume</a>
数组形式:
Array
(
[0] => Array
(
[iId] => 1
[sName] => Tom
[volume] => 6112
)
[1] => Array
(
[iId] => 2
[sName] => Jhon
[volume] => 1280
)
)