XML array with 2 href attributes
<p>I have the following XML array:</p>

<pre><code>["link"]=&gt;
          array(2) {
            [0]=&gt;
            object(SimpleXMLElement)#311 (1) {
              ["@attributes"]=&gt;
              array(3) {
                ["type"]=&gt;
                string(9) "text/html"
                ["href"]=&gt;
                string(48) "http://twitter.com/bob/statuses/1226112723"
                ["rel"]=&gt;
                string(9) "alternate"
              }
            }
            [1]=&gt;
            object(SimpleXMLElement)#312 (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"
              }
            }
          }
</code></pre>

<p>It's inside a bigger array, I need to get the first and second hef attribute seperatly so that I can put one href as a <code>&lt;a&gt;</code> link and another with a <code>&lt;img&gt;</code>.</p>

<p>How can I output each href rather than both together?</p>

<p>Currently trying this:</p>

<pre><code> foreach($entry-&gt;link as $link) {
     echo $link-&gt;attributes()-&gt;href;
 }
</code></pre>
