How to display/load JSON File using PHP with MySQLi

How to display/load JSON File using PHP with MySQLi

In this Post We Will Explain About is How to display/load JSON File using PHP with MySQLi With Example and Demo.Welcome on Live24u.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Get data from JSON file with PHP MySQLi Example

In this post we will show you Best way to implement jQuery to display/load images received from JSON file, hear for Fetch data from XML, JSON & MySQLi using jQuery Ajax & PHP with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Also Read :   The 10 Most Common Example PHP Developers




Here get or fetch data, take Imp note that We will be using students.json that We have simple included in the source code downloadable of this Best Lovely Post.

Creating the Script

Simple, I make the script to simple json load and display the data in simple JSON File. Make a new file,Like name as index.php and copy with paste the source codes below.

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>How to display/load JSON File using PHP with MySQLi - live24u.com</title>
	<link rel="stylesheet" type="text/css" href="admin/live24u/bootstrap/css/bootstrap.min.css">
</head>
<body>
<div class="live24u container">
	<h1 class="live24u page-header text-center">How to display/load JSON File using PHP with MySQLi</h1>
	<div class="live24u row">
		<div class="live24u col-md-8 col-md-offset-2">
			<table class="table table-bordered table-striped">
				<thead>
					<th>ID</th>
					<th>StudentName</th>
					<th>StudentLastname</th>
					<th>Student Address</th>
					<th>Student Gender</th>
				</thead>
				<tbody>
					<?php
						$alldata = file_get_contents('students.json');
						$alldata = json_decode($alldata);
						foreach($alldata as $mydata){
							echo "
								<tr>
									<td>".$mydata->id."</td>
									<td>".$mydata->studentname."</td>
									<td>".$mydata->studlname."</td>
									<td>".$mydata->studaddress."</td>
									<td>".$mydata->studgender."</td>
								</tr>
							";
						}
					?>
				</tbody>
			</table>
		</div>
	</div>
</div>
</body>
</html>

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Also Read :   AngularJS – How to Pass Parameters to Controllers on Initialization





Example

I hope you have Got What is Fetch JSON Data & Insert into Mysql table in PHP And how it works.I would Like to have FeedBack From My Blog(live24u.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(live24u.com) Are Most Always Welcome.