Quick way to convert XML to Array in PHP

This is the dirty and fast way to convert XML file to Array.

$array = json_decode(json_encode((array)simplexml_load_string($xml)),1);


Discover more from Juzhax Technology

Subscribe to get the latest posts sent to your email.

Categories