I should write a long html table and it will stay on several pages. They asked me to "manually" handle the number of rows to be printed on each page, and this number depends on the available space on the pages (and for each page the available space will be different, for sure).
They don't want to have un-managed, and potentially logically wrong, breaks in the table.
Now:
I have a loop printing row by row:
while ($rowitem = mysqli_fetch_array($connitem))
{
$name = $rowitem['name'];
echo("<TR><TD>$name</TD></TR>");
}
I can check if the available remaining length of the page is enough for the next row.
How can I determine the length of the available free space (let's say until the <footer>
tag) on my current page?