Header

PHP Http Function: Header

Content-type Response

JSON

header('Content-Type: application/json; charset=utf-8');

XML

header('Content-type: text/xml');