fork download
  1. <?php
  2.  
  3. $a = array(
  4. 'id' => '1',
  5. 'name' => 'Paris'
  6. ),
  7. 'id' => '2',
  8. 'name' => 'London'
  9. )
  10. );
  11.  
  12. echo json_encode($a);
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
[{"id":"1","name":"Paris"},{"id":"2","name":"London"}]