Is there any way to get all attributes and its values as an array. Here I have a node
<vehicle wheels="four" color="red"/>
what i need is to get an array like
$vehicle = array("wheels" => "four", "color" => "red");
Is there any way to get all attributes and its values as an array. Here I have a node
<vehicle wheels="four" color="red"/>
what i need is to get an array like
$vehicle = array("wheels" => "four", "color" => "red");