<?php $data = ['name' => 'John', 'age' => 35]; header('Content-type: Application/json'); echo json_encode($data);