-1
我有XML一樣:需要XML轉換成PHP數組
[domain] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => AlOkJainist
[com] => y
[comscore] => 805
[net] => y
[netscore] => 779
[tv] => y
[tvscore] => 753
[cc] => y
[ccscore] => 728
)
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => BargainsdiAlOg
[com] => y
[comscore] => 805
[net] => y
[netscore] => 779
[tv] => y
[tvscore] => 753
[cc] => y
[ccscore] => 728
)
)
[2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[name] => AlOkayJain
[com] => y
[comscore] => 792
[net] => y
[netscore] => 766
[tv] => y
[tvscore] => 740
[cc] => y
[ccscore] => 715
)
)
)
)
我想創建的PHP數組一樣:
array(
'AlOkJainist' => array([com] => y, [net] => y),
'BargainsdiAlOg' => array([com] => y, [net] => y),
'AlOkayJain' => array([com] => y, [net] => y),
);
請幫我,我都試過,但沒有獲得成功。
[你有什麼嘗試?](http://www.whathaveyoutried.com/) – 2012-07-20 13:32:35