求数组转XML源码解决办法

WBOY
Release: 2016-06-13 10:10:27
Original
922 people have browsed it

求数组转XML源码
要求:

1.可以适合多层的数组

2.支持属性

3.数组的键名可以是数字的


网上找了好多,都没有符合要求的

------解决方案--------------------
什么叫 支持属性 ???
------解决方案--------------------
xml的格式一般都是固定的。你可以用xml的标签来做数组的下标。

然后循环取值就行了
------解决方案--------------------
我记得,用xml 的对象就可以做。

Related labels:
xml
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!