Get JSON data using jQuery AJAX from a PHP page


Today I’ll show you simple procedure to get JSON data using jQuery AJAX from a PHP page.

Dependencies: Put jQuery library in same folder named after jquery.js. You can get jquery here .
Need a server to run php.

Now put jquery.js, AJAXtestJSON.php and AJAXJSONdata.php in same folder in server.

Here is the code of AJAXtestJSON.php

Here is the code of AJAXJSONdata.php

Advertisements