JSON

Failsafe when using JSON to load HTML data through PHP and AJAX

in


When we use JSON to load data into PHP from an external source we could run into some 'double-quote' problems when decoding the JSON string. By using a fairly simple regular expression we make sure the JSON string is still valid.

JSON and MySQL


We can make an adjustment to the generally accepted use of "fetch row from database and show" by using the GROUP_CONCAT function and JSON function, since we can recursively extend the JSON data this enables us to extend the data transportation mechanism without changing the code.

Syndicate content

Back to top