Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy AngularJS Tutorials</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script> </head> <body > <div ng-app="selectApp" ng-controller="selectController"> <h1>MYSQL Select with PHP in AngularJS</h1> <table border="1"> <tr> <th>Id</th> <th>Name</th> <th>Mobile</th> <th>Email</th> </tr> <tr ng-repeat="x in content"> <td>{{x.id}}</td> <td>{{x.name}}</td> <td>{{x.mobile}}</td> <td>{{x.email}}</td> </tr> </table> <h3>Please Use Ctrl+F5 for Refresh.</h3> </div> </body> <script> var postApp = angular.module('selectApp', []); postApp.controller('selectController', function($scope, $http) { $http.get("select.php") .then(function(response) { $scope.content = response.data.details; }); }); </script> </html>
www.wikitechy.com © Copyright 2016. All Rights Reserved.