Converting PHP XML to JSON, XML to Array, JSON to Array is very difficult task for some people. But, in PHP, believe me it’s very easy. One line of code each! Don’t believe? Just check out the code below and test it yourself!
1 2 3
$xml = simplexml_load_string($xmlstring); $json = json_encode($xml); $arr = json_decode($json,true);
Leave a comment
Welcome to my Blog
This blog is merely to record the things that I find interesting. It can be technical, humor, news, creative or anything that deserves to be posted here. Enjoy the blog and don't forget to throw comments and likes/+1's/tweets on posts you like. Thanks for visiting!
admin answers attribute block category checkbox checkout controller customer difference domain domain name EAV ebay aquires magento error extension guest interview invoice jquery linux magento magento admin magento error magento orm magento sample product purchase mysql observer order order sample of product orocrm pinterest product prototypejs questions redirect remove script session simplexml to array status study guide url versus xml