Skip to content

ArrayAsXml is a simple PHP class that converts array to XML.

Notifications You must be signed in to change notification settings

overbid/arrayasxml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

ArrayAsXml

ArrayAsXml is a simple PHP class that converts array to XML.

Based on SimpleXML.

Installation

via Composer

composer require overbid/arrayasxml

Usage

Load the library

require 'vendor/autoload.php';
use Overbid\ArrayAsXml;

Set custom configuration:

$arrayAsXml = new ArrayAsXml();
$arrayAsXml->setEncoding('TIS-620');  //default UTF-8
$arrayAsXml->setRootName('main');     //defaul root

Creat XML

echo $arrayAsXml->save($data);

About

ArrayAsXml is a simple PHP class that converts array to XML.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages