How to convert XML into array in PHP?

I want to convert below XML to PHP array. Any suggestions on how I can do this?

<aaaa Version="1.0">
       <dddd Id="id:pass" />
       <eeee name="hearaman" age="24" />


Another option is the SimpleXML extension (I believe it comes standard with most php installs.)

The syntax looks something like this for your example

$xml = new SimpleXMLElement($xmlString);
echo $xml->bbb->cccc->dddd['Id'];
echo $xml->bbb->cccc->eeee['name'];
// or...........
foreach ($xml->bbb->cccc as $element) {
  foreach($element as $key => $val) {
   echo "{$key}: {$val}";