How To Pretty Print JSON in PHP

Published Date Author: , Posted June 11th, 2020 at 12:07:49pm

If you ever want to view your JSON as a human ;-}

$pretty_json = json_encode($data, JSON_PRETTY_PRINT);

https://www.php.net/manual/en/function.json-encode.php

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.