php echo json

Solutions on MaxInterview for php echo json by the best coders in the world

showing results for - "php echo json"
Miguel
28 Sep 2018
1<?php
2$data = ['name' => 'John', 'age' => 35];
3header('Content-type: Application/json');
4echo json_encode($data);
5