Home » Display JSON Data from database using php using jquery ajax

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!.

Read Also:  Simple PHP Shopping Cart

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.

Read Also:  jQuery Ajax GET & POST REQUEST Methods PHP MySQLi


<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

Read Also:  Laravel WhereHas then orWhereHas Example



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.

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  How to Get last inserted ID using Laravel
  2. Read Also:  install and/or enable a php accelerator (highly recommended)
  3. Read Also:  PHP Generate Random shuffles Strings Example
  4. Read Also:  Model View Controller(MVC) in PHP Hello World Example
  5. Read Also:  Dynamically Upload Multiple Images Using PHP and jQuery
  6. Read Also:  jQuery AJAX Submit form serialize PHP MySQLi
  7. Read Also:  PHP Array Length Size Count Tutorial With Example
  8. Read Also:  PHP change Laravel Date Formats Example
  9. Read Also:  Dynemically HTML table from AJAX response using PHP
  10. Read Also:  $digest() Function using Angular Example

Leave a Comment

Your email address will not be published. Required fields are marked *