title: Trying to get key in a foreach loop to work using blade
body: <p>if I use <code>{{$node[0]-&gt;url}}</code> then Laravel's templating engine dislays the correct result but I can not figure out how to display all using the @for $i=0 within a @foreach loop this is what I have in my routes file</p>
  
  <pre><code>$oReturn = new stdClass();
          $fid='endpoints';//sample fid
  
          $url = 'http://localhost:5493/sdata/$system/registry/'.$fid;
  
          $xml = simplexml_load_file($url);
          foreach($xml-&gt;xpath("//sdata:payload") as $entry) {
              // xpath here must be from payload to endPoint--type
              $content = $entry-&gt;xpath("./sdata:endPoint--type");
  
              foreach($content as $c) {
                  // Make set of children with prefix sdata
                  $nodes = $c-&gt;children('sdata', true);
  
              }
  
  // add parsed data to the array
              $oReturn-&gt;entry[] = $nodes;
  
          }
          return View::make('index', compact('oReturn'));
  </code></pre>
  
  <p>and this is what I have tried in my view file</p>
  
  <pre><code>@for($i=0; $i &lt; 4; $i++)
  @endfor
  @foreach ($oReturn as $node)
     &lt;li&gt;{{$node[$i]-&gt;url}}&lt;/li&gt;
  @endforeach
  </code></pre>
  
  <p>sorry here is the complete print_r result</p>
  
  <pre><code>Array ( [oReturn] =&gt; stdClass Object 
  ( [entry] =&gt; Array 
      ( 
          [0] =&gt; SimpleXMLElement Object ( [description] =&gt; Sage 50 Accounts [protocol] =&gt; http [host] =&gt; base_3 [applicationName] =&gt; accounts50 [contractName] =&gt; SimpleXMLElement Object ( ) [dataSetName] =&gt; - [url] =&gt; http://base_3:5493/sdata/accounts50 [isBrowsable] =&gt; true [aliveStamp] =&gt; 2015-11-06T23:31:10.031+00:00 ) 
          [1] =&gt; SimpleXMLElement Object ( [endPointType] =&gt; dataSet [applicationName] =&gt; accounts50 [contractName] =&gt; GCRM [dataSetName] =&gt; Enter Your Company Name [url] =&gt; http://base_3:5493/sdata/accounts50/GCRM/{C22ACA13-3C4C-4E33-A584-CD99BD3002A6} ) 
          [2] =&gt; SimpleXMLElement Object ( [endPointType] =&gt; dataSet [applicationName] =&gt; accounts50 [contractName] =&gt; GCRM [dataSetName] =&gt; Enter Your Company Name [url] =&gt; http://base_3:5493/sdata/accounts50/GCRM/{FF476636-D4AF-4191-BDE4-891EDA349A68} ) 
          [3] =&gt; SimpleXMLElement Object ( [endPointType] =&gt; dataSet [applicationName] =&gt; accounts50 [contractName] =&gt; GCRM [dataSetName] =&gt; Enter Your Company Name [url] =&gt; http://base_3:5493/sdata/accounts50/GCRM/{C62A13D5-3FFE-43B4-9DAF-38F9055A83C7} ) 
          [4] =&gt; SimpleXMLElement Object ( [description] =&gt; GCRM Contract [endPointType] =&gt; contract [protocol] =&gt; http [host] =&gt; base_3 [applicationName] =&gt; accounts50 [contractName] =&gt; GCRM [dataSetName] =&gt; - [url] =&gt; http://base_3:5493/sdata/accounts50/GCRM [aliveStamp] =&gt; 2015-11-06T23:31:11.062+00:00 ) 
      ) 
  ) 
  ) 1
  </code></pre>