@attribute elements in XML
<p>Here is my XML:</p>

<pre><code>["link"]=&gt;
          array(2) {
            [0]=&gt;
            object(SimpleXMLElement)#244 (1) {
              ["@attributes"]=&gt;
              array(3) {
                ["type"]=&gt;
                string(9) "text/html"
                ["href"]=&gt;
                string(48) "http://twitter.com/MoodleDan/statuses/1226112723"
                ["rel"]=&gt;
                string(9) "alternate"
              }
            }
            [1]=&gt;
            object(SimpleXMLElement)#245 (1) {
              ["@attributes"]=&gt;
              array(3) {
                ["type"]=&gt;
                string(9) "image/png"
                ["href"]=&gt;
                string(59) "http://a3.twimg.com/profile_images/226895523/Dan_normal.png"
                ["rel"]=&gt;
                string(5) "image"
              }
            }
          }
          ["author"]=&gt;
          object(SimpleXMLElement)#246 (2) {
            ["name"]=&gt;
            string(14) "Dan Humpherson"
            ["uri"]=&gt;
            string(16) "http://vl3.co.uk"
          }
</code></pre>

<p>The above XML is part of a larger array, but how do i get the </p>

<pre><code>href -&gt;          ["href"]=&gt;
                    string(59) "http://a3.twimg.com/profile_images/226895523/Dan_normal.png"
</code></pre>

<p>Element to echo in PHP?</p>

<p>This is what I tried (Wrong I know)</p>

<pre><code> foreach ($entry-&gt;link as $img) {
            echo $img-&gt;href;
            echo "&lt;img src='". $img ."' /&gt;";
           }
</code></pre>
