fork(26) download
  1. <?php
  2.  
  3. // your code goes here
  4.  
  5. $json = '{"area": [
  6. {
  7. "area": "kothrud"
  8. },
  9. {
  10. "area": "katraj"
  11. }
  12. ]}';
  13.  
  14. $area = json_decode($json,TRUE);
  15. $area = $area['area'];
  16.  
  17. foreach ($area as $val )
  18. {
  19. echo $val['area'];
  20. echo '---';
  21.  
  22. }
Success #stdin #stdout 0.01s 24400KB
stdin
Standard input is empty
stdout
kothrud---katraj---