function createxmlele($data, $name='root', &$doc=null, &$node=null){if ($doc==null){$doc = new DOMDocument('1.0','UTF-8');$doc->formatOutput = TRUE;$node = $doc;}if (is_array($data)){foreach($data as $var=>$val){if (is_numeric($var)){$this->createxmlele($val, $name, $doc, $node);}else{if (!isset($child)){$child = $doc->createElement($name);$node->appendChild($child);}$this->createxmlele($val, $var, $doc, $child);}}}else{$child = $doc->createElement($name);$node->appendChild($child);$textNode = $doc->createTextNode($data);$child->appendChild($textNode);}if ($doc==$node){return $doc;}}
Shopify, Shopify Apps, Magento, WordPress, Codeigniter, Joomla, Big Commerce | PHP
Showing posts with label simplexml. Show all posts
Showing posts with label simplexml. Show all posts
Thursday, 4 June 2020
How to convert a multidimensional Array To XML in PHP
Tuesday, 2 January 2018
How to install extensions in php 7 cent os
Install extensions in php 7 cent os follow these steps
1. curl 'https://setup.ius.io/' -o setup-ius.sh
2. sudo bash setup-ius.sh
3. sudo yum install -y mod_php70w php70w-cli php70w-mysqlnd php70w-json php70w-gd php70w-dom php70w-simplexml php70w-mcrypt php70w-intl httpd mysql-server git
Labels:
Cent,
Cent OS,
cli,
dom,
Extensions,
Git,
httpd,
install,
Intl,
JSON,
Magento 2,
Mcrypt,
mysql-server,
mysqlnd,
PHP,
PHP 7,
simplexml
Subscribe to:
Posts (Atom)