I\'m building a PHP script that feeds JSON data to another script. My script builds data into a large associative array, and then outputs the data using json_encode
json_encode
PHP 5.4 offers the JSON_PRETTY_PRINT option for use with the json_encode() call.
JSON_PRETTY_PRINT
json_encode()
http://php.net/manual/en/function.json-encode.php