PHP JSON Encode

To find out how JSON encoding worked with PHP, I did a little testing. PHP data can be encoded with the json_encode function. The function does not work with objects, but seems to work quite well with arrays. As you can see with the example below, you can pretty much embed arrays to your hearts content. Click on the title link to see the output produced.

json01.php

Some of the later examples show how you can encode the JSON in a pretty specific format.