Say I have an array like this:<?php$colors=array();$colors[0]['id']=1;$colors[0]['color']='blue';$colors[1]['id']=2;$colors[1]['color']='green';......?>What's the easiest way to have the entire array converted to XML? 解决方案 Take a look at these pre-defined implementations:http://snipplr.com/view/3491/convert-php-array-to-xml-or-simple-xml-object-if-you-wish/http://vantulder.net/f2o/notities/arraytoxml/ 这篇关于将 PHP 数组转换为 XML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-29 01:55