Posted by Kim Andrι Akerψ on 04/16/07 11:15
Man-wai Chang wrote:
> Is there a php function that dumps an array to a XML file?
Not by itself, no. But you can output XML based on your array, like
this (please note that this is just a short example - you'll have to
make sure your XML output is valid yourself):
echo "<?xml version=\"2.0\"?>\n";
foreach($array as $element) {
echo "<item>".$element."</item>\n";
}
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|