title: Laravel 4 - DB::select returns array but not found $array[$key]
body: <p>In laravel 4 route, i have a database query like this  </p>
  
  <pre><code>$data1 = DB::select('SELECT MAX(id) AS mxid FROM table_name', array());
  return $data1["mxid"];  
  </code></pre>
  
  <p>But it gives the following error:  </p>
  
  <p><img src="https://i.stack.imgur.com/yMPTl.jpg" alt="enter image description here"></p>
  
  <p>Help me. I can't understand why this key is not found . If i  write  </p>
  
  <pre><code>return $data1;  
  </code></pre>
  
  <p>it gives,  </p>
  
  <pre><code>[{"mxid":"0"}]
  </code></pre>