Video: Passing Data Between PHP and JavaScript Using JSON
Got seven minutes to learn how you can harness the power of PHP, JavaScript and JSON in a powerful AJAX-driven web application? This Internet.com Video tutorial shows you all you need to know to pass data between the client and server using JSON data format.
After a brief introduction to JSON (JavaScript Object Notation), noted author and PHP Guru Jason Gilmore demonstrates how to implement an end-to-end web solution that involves the following steps:
- A user initiates a request for book-related data from a jQuery-enhanced web page.
- PHP responds to this request by converting an array to JSON format and sending the response to the Ajax-enabled web page.
- jQuery decodes the JSON-formatted data and updates the web page.
View the entire seven-minute video tutorial at Internet.com/Video:
Passing Data Between PHP and JavaScript Using JSON
This article was originally published on February 6, 2010