Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php xml to array

public function xmlToArray($xmlstring){
    
  $xml = simplexml_load_string($xmlstring, "SimpleXMLElement", LIBXML_NOCDATA);
  $json = json_encode($xml);
  $array = json_decode($json,TRUE);

  return $array;

}
Comment

convert xml file to array php

$xmlfile = file_get_contents($path);
		$ob= simplexml_load_string($xmlfile);
		$json  = json_encode($ob);
		$configData = json_decode($json, true);
Comment

PREVIOUS NEXT
Code Example
Php :: debug wordpress errors 
Php :: php extract time from datetime 
Php :: php server request method 
Php :: laravel uppercase first letter 
Php :: image dimension when uploading in laravel validation 
Php :: date casting from datetime to d-m-Y laravel using cast 
Php :: disable admin bar wordpress 
Php :: find word in text in laravel 
Php :: wordpress get the main url 
Php :: get theme path in wordpress 
Php :: wordpress custom theme style.css 
Php :: php add element to array first position 
Php :: how get last item in foreach in laravel 
Php :: php string to array 
Php :: php version change ubuntu 
Php :: wpml get current language filter 
Php :: foreign id laravel migration 
Php :: tmp cakephp name 
Php :: styling not working in laravel breeze 
Php :: print all session in codeigniter 
Php :: how to open server in php 
Php :: php mysqli connection check 
Php :: old value in laravel 
Php :: hashing passwords in yii 1 
Php :: php myadmin reset auto incremente 
Php :: wordpress execute query 
Php :: how to connect to a database in php 
Php :: migrate symfony command 
Php :: define url wordpress 
Php :: run laravel localhost network 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =