Warning I do not know if it will have to do with what you want to solve but here you have to be clear that the php only has php code, and that at the end of executing that php it should show all the data that you want to show in the client (js). Example to see if you are returning the data well you have to put it in the xampp that I guess all that you will have done but you will put in the url: localhost: 8080 / folder Where is the PHP file / myArchive.php
In which you can see if you are returning the data well your php and then collect them with js, jquery or angularjs.
These would be get methods that would be to collect the data you send from the php
This method is an http. For example, in js if I'm not mistaken, that's the way I've looked.
function httpGetAsync(theUrl, callback)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
callback(xmlHttp.responseText);
}
xmlHttp.open("GET", theUrl, true); // true for asynchronous
xmlHttp.send(null);
}
In jquery it would be like this:
$.get("rutaDelArchivo/miArchivo.php", function(data, status){
alert("Data: " + data + "\nStatus: " + status);
});
In angularjs it would be like this:
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
$http.get("rutaDelArchivo/miArchivo.php")
.then(function(response) {
$scope.contenidoDeTodoElJson = response.data;
});
});