<?php
	//header('Content-Type: text/plain, charset=utf-8');
	//header('Content-type: text/json, charset=utf-8');


 echo json_encode($output_data);

?>

This page is to display array, $output_data, in json format.

What kind content type do I have to set up?

header('Content-Type: text/plain, charset=utf-8');

(if the header set up like this, firefox will display this json page but internet explorer will not display it)

or

header('Content-type: text/json, charset=utf-8');

(if the header set up like this, neither firefox will display this json page nor internet explorer will display it)

or what else header should I set up for json page?

Or no need to set up the header content type?

Because json is utf-8, no need to tell it again?

Thanks!

    Don't skip the content type header for json. I use text/x-json without any problems.

      A websearch tells most used is:

      Content-Type: application/json

        Write a Reply...