ih im pretty new to xml so it maybe simple to answer if i have an xml file as follows

<bets>
<comp>
<name id='1234'>Matt</name>
<price>12/3</price>
</comp>
<comp>
<name id='1233'>Nick</name>
<price>170/3</price>
</comp>
<comp>
<name id='1232'>Dan</name>
<price>199/1</price>
</comp>
</bets>

is there anyway of didplaying the id aswel??

im using this to display the names and price

------------------------------------

<?php

$xml = simplexml_load_file('betting.xml');

foreach ($xml->comp as $comp) {
echo $comp->name.' '.$comp->price.'<br>';

}
?>

-----------------------------------

cheers matt