print json_encode($data) code example Example: json_encode() json_encode(['name' => 'Jake', 'country' => 'Philippines'])