php change header to json
snippet in php

php change header to json

user9082

<?PHP
$data = /** whatever you're serializing **/;
header('Content-Type: application/json');
echo json_encode($data);