title: How to access JSON decoded array in PHP
body: <p>I returned an array of <code>JSON</code> data type from <code>javascript</code> to <code>PHP</code>, I used <code>json_decode($data, true)</code> to convert it to an associative array, but when I try to use it using the associative <code>index</code>, I get the error <code>"Undefined index"</code> The returned data looks like this</p>
  
  <pre><code>array(14) { [0]=&gt; array(4) { ["id"]=&gt; string(3) "597" ["c_name"]=&gt; string(4) "John" ["next_of_kin"]=&gt; string(10) "5874594793" ["seat_no"]=&gt; string(1) "4" } 
  [1]=&gt; array(4) { ["id"]=&gt; string(3) "599" ["c_name"]=&gt; string(6) "George" ["next_of_kin"]=&gt; string(7) "6544539" ["seat_no"]=&gt; string(1) "2" } 
  [2]=&gt; array(4) { ["id"]=&gt; string(3) "601" ["c_name"]=&gt; string(5) "Emeka" ["next_of_kin"]=&gt; string(10) "5457394839" ["seat_no"]=&gt; string(1) "9" } 
  [3]=&gt; array(4) { ["id"]=&gt; string(3) "603" ["c_name"]=&gt; string(8) "Chijioke" ["next_of_kin"]=&gt; string(9) "653487309" ["seat_no"]=&gt; string(1) "1" }  
  </code></pre>
  
  <p>Please, how do I access such array in <code>PHP</code>? Thanks for any suggestion.</p>