I have 2026 image records to display on screen and it's too many to show all at once. I want to display the first 50, pause, wait for user to click a button. Then list the next 50, and so on. Is this a good solution? How can I do this? I want to echo javascript commands with php to display groups of 50 records.
<?php
$X = 0; $limit = 1000;
foreach ($i; $i <= $limit; $i++) {
$X++;
echo "<div> </div>";
if ($X % 50 == 0)
{echo '<button> continue </button>';}
}
?>