PHP Quick Convert XML to Array

Published 23rd September 2012

This one is quick and simple:

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