Functions
Array2XML.php File Reference

Functions

 array2xml ($array, $name='array', $beginning=true)
 array2xml() will convert any given array into a XML structure.

Function Documentation

array2xml ( array,
name = 'array',
beginning = true 
)

array2xml() will convert any given array into a XML structure.

Version:
: 1.0
Author:
: Marcus Carver © 2008

Email: marcuscarver@gmail.com

Link: http://marcuscarver.blogspot.com/

Arguments : $array - The array you wish to convert into a XML structure. $name - The name you wish to enclose the array in, the 'parent' tag for XML. $beginning - INTERNAL USE... DO NOT USE!

Returns:
: Gives a string output in a XML structure

Use: echo array2xml($products,'products'); die;

This file is part of the Basic Meeting List Toolbox (BMLT).

Find out more at: http://magshare.org/bmlt

BMLT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

BMLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this code. If not, see <http://www.gnu.org/licenses/>.

Parameters:
arrayThe input array
nameThe name that you want as the root element for the XML output
beginningUsed for the recursive parser. Not for external use.

Referenced by TranslateToXML().

 All Classes Files Functions Variables Enumerations