Display JSON Data from database using php using jquery ajax

Display JSON Data from database using php using jquery ajax

Welcome on Pakainfo.com – Examples ,The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Display JSON Data from database using php using jquery ajax

In this post we will show you Best way to implement how to retrieve data from database in php using jquery ajax, hear for How to Display JSON Data with jQuery and Ajax with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

JSON stands for for (Java Script Object Notation) is a simple lightweight parametrs data passing format and some human readable very easy contains java structures.
In this post I will be learn to explain Creating simple JSON file as well as PHP source and Display some JSON data using call back of jquery and Ajax.
Using JSON you can interchange all the data between the client side browsers and the server Like as a PHP.


<post_name>live24u | web - devlopig - Programming Blog</post_name>
<post_name>jQuery and Ajax Demos</post_name>

JSON Structure

"post_name":"live24u | Programming Blog", 
"post_name":"live24u - jQuery and Ajax Demos", 

Javascript Code

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
			$.each(data.website_list, function(i,data)
				var div_data =
				"<div ><a href='"+data.web-url+"'>"+data.post_name+"</a></div>";
return false;

Load Click using jquery

----//your some code
----//your some code
return false;
<input type="button" value=" Load " class="data-load" />

Creating JSON file with PHP : Database Table live_post

CREATE TABLE live_post
post_name VARCHAR(200),
web-url VARCHAR(200)

live_json.php – Contains simple PHP code.

$my_sql=mysql_query("select * from live_post limit 20");
echo '{"website_list": [';
echo '
echo ']}';

Loading PHP file

If we want to data-load PHP file replace some javascript code jquery $.getJSON(“data.js”,function(data)to

Also Read This 👉   Laravel Eloquent Where Query Tutorial With Examples



I hope you have Got Display JSON Data in HTML Table using jQuery and AJAX And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.