title: php nested array returning undefined index
body: <p>I can't seem to figure out why my code returns "undefined index "Account"</p>
  
  <p>Below is my array data and code</p>
  
  <p>Data:- </p>
  
  <pre><code>$file_array = Array
  (
  [0] =&gt; Array
      (
          [Account] =&gt; 123456789
          [Portfolio_id] =&gt; 111
      )
  [1] =&gt; Array
      (
          [Account] =&gt; 987654321
          [Portfolio_id] =&gt; 112
      )
  )
  </code></pre>
  
  <p>code:-</p>
  
  <pre><code>foreach ($file_array as $k=&gt;$data) {
      echo "&lt;pre&gt;";print_r($data['Account']); //line 578
  }
  </code></pre>
  
  <p>Error:-</p>
  
  <pre><code>Notice:  Undefined index: Account in app/controllers/DataController.php on line 578
  </code></pre>
  
  <p>If i <code>print_r($data['Portfolio_id'])</code>, the value is returned. I am only getting the error when trying to print <code>$data['Account']</code></p>
  
  <p>I can't seem to find the error in my code. Maybe someone here will be able to see it.
  Any help is appreciated.</p>