Skip to content
Advertisement

Tag: pretty-print

Pretty-Printing JSON with PHP

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. Here is an example script: The above code yields the following output: This is great if you have a small amount of data, but I’d prefer something along these lines: Is there

Advertisement