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?
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/