library php-dom-utils
Provides an easy way to fill a DOMDocument with an array
tonivdv/php-dom-utils
Provides an easy way to fill a DOMDocument with an array
- Tuesday, July 14, 2015
- by toni.vdv
- Repository
- 1 Watchers
- 2 Stars
- 12 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Php Dom Utils
, (*1)
Provides an easy way to fill a DOMDocument with an array, (*2)
$array = array(
"nodes" => array(
"node" => array(
0 => "text1",
1 => "text2"
)));
$dom = new \DOMDocument('1.0', 'utf-8');
PhpDomUtils::fillDom($dom, $array);
echo $dom->saveXML();
Above example would output:, (*3)
<?xml version="1.0" encoding="utf-8"?>
<nodes>
<node>text1</node>
<node>text2</node>
</nodes>
dev-master
9999999-dev
Provides an easy way to fill a DOMDocument with an array
Sources
Download
MIT
The Development Requires