title: values without key in json array - php code
body: <p>In the JSON array, we usually put, key: values.  The code for getting marks of specific student (where code no is posted). The php code:</p>
  
  <pre><code>&lt;?php
  $results = '{"marks": 
   [
         {"code":"125001", "Maths":"95", "Science":"91", "Biology":"80"},
           ........
     }
   ]
  }';
  
  
  $demo = json_decode($results, true);  
     foreach ( $demo['marks'] as $row ) {  
         if ($row['code'] =='125001') { // do the work
     }
  }
  ?&gt;
  </code></pre>
  
  <p>Can we put only values without mentioning the key names each time - as it will save time. in that case the json array would be:</p>
  
  <pre><code>$results = '{"marks": 
  [// values for: code, Maths, Science, Biology
  {"125001", "95", "91", "80"},
  {"125002", "90", "88", "85"}
  ]}';
  </code></pre>
  
  <p>Please  give some idea in this please?</p>