var btn = document.getElementById("button");
btn.addEventListener("click", function() {
var xreq = new XMLHttpRequest();
var response = document.getElementById("videoObjs");
xreq.open('GET', 'xjsonData.php', true);
xreq.onload = function() {
response.innerHTML += xreq.responseText;
console.log(response);
};
xreq.send(null);
});
$file = "data.txt";
$content = file_get_contents($file);
$arr =json_decode($content, true);
print_r($arr);
echo "<br><br>";
What I have tried:
i got large json file, every time i click on button, it s loading the whole large amounts of data onto page, is there any way to load only first 100 results, then on next click to load another 100 results, and so on, please, thanks, with using pure php, javascript, php , json.. no mysql, and no frameworks like j query or anything els, simply trying to use pure languages