title: foreach works, key does not, PHP
body: <p>I know this is probably a misunderstanding in syntax and I'm sure it is because I am working with Java and C++ right now on top of PHP, but nonetheless I would really appreciate some guidance. This is in PHP.</p>
  
  <p>This works,</p>
  
  <pre><code>$entry;
  foreach($this-&gt;channel as $i){
      $entry = $i;
      break;
  }
  echo $entry-&gt;title();
  </code></pre>
  
  <p>This does not,</p>
  
  <pre><code>echo $this-&gt;channel[0]-&gt;title();
  </code></pre>
  
  <p>Appreciate the help.</p>
  
  <p>As per, "zerkms" remarks,</p>
  
  <pre><code>object(Zend_Feed_Rss)#43 (9) {
    ["_entryClassName":protected] =&gt; string(19) "Zend_Feed_Entry_Rss"
    ["_entryElementName":protected] =&gt; string(4) "item"
    ["_defaultNamespace":protected] =&gt; string(3) "rss"
    ["_entryIndex":protected] =&gt; int(0)
    ["_entries":protected] =&gt; array(1) {
      [0] =&gt; object(DOMElement)#63 (17) {
        ["tagName"] =&gt; string(4) "item"
        ["schemaTypeInfo"] =&gt; NULL
        ["nodeName"] =&gt; string(4) "item"
        ["nodeValue"] =&gt; string(1058) "tag:blogger.com,1999:blog-7914458791192620477.post-6083787759488123555Fri, 07 Mar 2014 02:03:00 +00002014-03-06T18:03:27.296-08:00Test Title: tamuHack&lt;strong style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;"&gt;Lorem Ipsum&lt;/strong&gt;&lt;span style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;"&gt;&amp;nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&lt;/span&gt;http://tamuhack.blogspot.com/2014/03/test-title-tamuhack.htmlnoreply@blogger.com (Robert Timm)0"
        ["nodeType"] =&gt; int(1)
        ["parentNode"] =&gt; string(22) "(object value omitted)"
        ["childNodes"] =&gt; string(22) "(object value omitted)"
        ["firstChild"] =&gt; string(22) "(object value omitted)"
        ["lastChild"] =&gt; string(22) "(object value omitted)"
        ["previousSibling"] =&gt; string(22) "(object value omitted)"
        ["attributes"] =&gt; string(22) "(object value omitted)"
        ["ownerDocument"] =&gt; string(22) "(object value omitted)"
        ["namespaceURI"] =&gt; NULL
        ["prefix"] =&gt; string(0) ""
        ["localName"] =&gt; string(4) "item"
        ["baseURI"] =&gt; string(44) "/Users/bob/School/tamu_hack/src/public_html/"
        ["textContent"] =&gt; string(1058) "tag:blogger.com,1999:blog-7914458791192620477.post-6083787759488123555Fri, 07 Mar 2014 02:03:00 +00002014-03-06T18:03:27.296-08:00Test Title: tamuHack&lt;strong style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;"&gt;Lorem Ipsum&lt;/strong&gt;&lt;span style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;"&gt;&amp;nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&lt;/span&gt;http://tamuhack.blogspot.com/2014/03/test-title-tamuhack.htmlnoreply@blogger.com (Robert Timm)0"
      }
    }
    ["_element":protected] =&gt; object(DOMElement)#62 (17) {
      ["tagName"] =&gt; string(7) "channel"
      ["schemaTypeInfo"] =&gt; NULL
      ["nodeName"] =&gt; string(7) "channel"
      ["nodeValue"] =&gt; string(1215) "tag:blogger.com,1999:blog-7914458791192620477Fri, 07 Mar 2014 02:03:27 +0000tamuHackhttp://tamuhack.blogspot.com/noreply@blogger.com (Robert Timm)Blogger1125tag:blogger.com,1999:blog-7914458791192620477.post-6083787759488123555Fri, 07 Mar 2014 02:03:00 +00002014-03-06T18:03:27.296-08:00Test Title: tamuHack&lt;strong style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;"&gt;Lorem Ipsum&lt;/strong&gt;&lt;span style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;"&gt;&amp;nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&lt;/span&gt;http://tamuhack.blogspot.com/2014/03/test-title-tamuhack.htmlnoreply@blogger.com (Robert Timm)0"
      ["nodeType"] =&gt; int(1)
      ["parentNode"] =&gt; string(22) "(object value omitted)"
      ["childNodes"] =&gt; string(22) "(object value omitted)"
      ["firstChild"] =&gt; string(22) "(object value omitted)"
      ["lastChild"] =&gt; string(22) "(object value omitted)"
      ["previousSibling"] =&gt; NULL
      ["attributes"] =&gt; string(22) "(object value omitted)"
      ["ownerDocument"] =&gt; string(22) "(object value omitted)"
      ["namespaceURI"] =&gt; NULL
      ["prefix"] =&gt; string(0) ""
      ["localName"] =&gt; string(7) "channel"
      ["baseURI"] =&gt; string(44) "/Users/bob/School/tamu_hack/src/public_html/"
      ["textContent"] =&gt; string(1215) "tag:blogger.com,1999:blog-7914458791192620477Fri, 07 Mar 2014 02:03:27 +0000tamuHackhttp://tamuhack.blogspot.com/noreply@blogger.com (Robert Timm)Blogger1125tag:blogger.com,1999:blog-7914458791192620477.post-6083787759488123555Fri, 07 Mar 2014 02:03:00 +00002014-03-06T18:03:27.296-08:00Test Title: tamuHack&lt;strong style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;"&gt;Lorem Ipsum&lt;/strong&gt;&lt;span style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;"&gt;&amp;nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&lt;/span&gt;http://tamuhack.blogspot.com/2014/03/test-title-tamuhack.htmlnoreply@blogger.com (Robert Timm)0"
    }
    ["_encoding":protected] =&gt; string(5) "UTF-8"
    ["_parentElement":protected] =&gt; NULL
    ["_appended":protected] =&gt; bool(true)
  }
  </code></pre>