Using json_encode() and json_decode() in PHP4

clipped from abeautifulsite.net , additions by me
I use json_encode() a lot for AJAX calls. Teamed with
jQuery’s $.getJSON(), it’s too convenient
not to use. Unfortunately, json_encode() doesn’t come standard until PHP 5.2. To add insult to injury, most
current *nix distros don’t include PHP 5.2 in their official repositories yet.

So, if you’re using PHP4 download JSON’s json_encode and json_decode for PHP4 (which automatically degrade for PHP5, thus not breaking your app during an upgrade) here:

http://mike.teczno.com/json.html

http://mike.teczno.com/JSON/JSON.phps

json
This entry was posted in Web Development and tagged , , . Bookmark the permalink.