title: Choosing Last Node in SimpleXML
body: <p>I want to find the attribute of the last node in the xml file. </p>
  
  <p>the following code find's the attribute of the first node. Is there a way to find the last node ? </p>
  
  <pre><code>foreach ($xml-&gt;gig[0]-&gt;attributes() as $Id){
  }
  </code></pre>
  
  <p>thanks </p>