我必须使用php将数组转换为xml。
下面是我的xml
<custom-attributes>
<custom-attribute dt:dt="int" name="Attr_New">0</custom-attribute>
<custom-attribute dt:dt="date" name="Attr_New_Date">20150601</custom-attribute>
<custom-attribute dt:dt="string" name="Attr_Base_SKU">314100822304</custom-attribute>
我想要如下输出,
[custom-attribute] => Array
(
[Attr_New] => 0
[Attr_New_Date] => 20150601
[Attr_Base_SKU] => 314100822304
)
但是Iam变得像下面一样,
[custom-attribute] => Array
(
[0] => 0
[1] => 20150601
[2] => 314100822304
)
请帮助我某人