PHP Pages with index 0

0

I need to list results by pages; My array contains X number of results, however I can not get the index of the list to increase by a value of 10 starting from 0.

For example:

Pagina = 1
Inicio = 0
Fin = 10

So far we go well, the question is when the value of the page increases, it stops being 1 and now it is 2 or 3 +;

If the page is 2, it should start at 11 and if it is 3, it should start at 22 since we would not be counting 21 because we have already shown it on the previous page.

I reduced it a little more:

$limit = 10;
$from = ((intval($page)*$limit)-$limit);
$end = ($from+$limit);
    
asked by Arcaela 09.11.2018 в 14:37
source

0 answers