How to fix json_decode in PHP
When you have first installed PHP, you may find that json_decode
doesn't work. What will happen is you will be given no output at all. Carry on reading if you would like to know how to fix it.
To determine the symptoms:
- Enable error messages to be shown by writing
ini_set('display_errors', '1');
in your PHP code. - Most likely, you will be given this error message now:
Php Fatal Error Call To Undefined Function Json_decode
The solution: