How To Pretty Print JSON in PHP
erics, 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);
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
Categories: How-To's, Technology Tags: howto, JSON, php, Pretty, Pretty Print, Print, tips
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Copyright © 2005-2024 Eric Michael Stone | Random Thoughts, Whims and Fancies…. Powered by WordPress
Leave Your Comment
All fields marked with "*" are required.