Here is my code:
$json = '{"1":{"show":true},"2":{"show":false}}';
echo '<pre>',print_r(json_decode($json, true)),'</pre>';exit;
Following is the output of the code.
How can I preserve the boolean values? Thanks in advance.
Here is my code:
$json = '{"1":{"show":true},"2":{"show":false}}';
echo '<pre>',print_r(json_decode($json, true)),'</pre>';exit;
Following is the output of the code.
How can I preserve the boolean values? Thanks in advance.