title: Laravel Undefined index Error in array values display
body: <p>I am using Laravel 4.2. I have two mysql tables OwnTable, OtherTable. I am getting values successfully from these tables through php. </p>
  
  <p>My further PHP code look like below to display values in blade php, </p>
  
  <pre><code>if (!empty ($OwnTable)){
              foreach($OwnTable as $owntbl){
                  $Finalvalue['OwnValue']['Name'] = $owntbl-&gt;Name;
              }
          }
  if (!empty ($OtherTable)){
              foreach($OtherTable as $othertbl){
                  $Finalvalue['OtherValue']['Name'] = $othertbl-&gt;Name;
              }
          }
  
   $myData = array('Finalvalue' =&gt; $Finalvalue);
   if(.....) {
      return View::make('display')-&gt;with('myData', $myData);
   }
  </code></pre>
  
  <p>And the code in display.blade look like below,</p>
  
  <pre><code>            &lt;tbody&gt;     
                  @foreach($myData['Finalvalue'] as $res)
                      &lt;tr&gt;
                          &lt;td&gt;{{{$res['OwnValue']['Name']}}}&lt;/td&gt;
                          &lt;td&gt;{{{$res['OtherValue']['Name']}}}&lt;/td&gt;
                       &lt;/tr&gt;
                  @endforeach     
              &lt;/tbody&gt;  
  </code></pre>
  
  <p>When I try to run the code, it gives an error 'Undefined index: OwnValue'.</p>
  
  <p>I am sure I am doing some mistakes in array Handling. I am not so much talent in array handling. Highly appreciate if anyone suggest me in this. Thanks :-)</p>