I created a generic api using php programming for the output I used
json_encode($arr),
Now I want to print the output as a fairly printed format in the browser without using the JSON Viewer extensions.
I have already done 400+ web services using json_encode ($ arr) for output, but I don't want to change
echo json_encode($arr, JSON_PRETTY_PRINT);
I just want how to override the default json_encode () predefined functionality to completely fill my need.
source share