A
A
Albert Tobacco2014-08-04 20:48:36
Zend Framework
Albert Tobacco, 2014-08-04 20:48:36

How to create number of pages depending on the number of entries?

The task is as follows:
Display 30 records on each page, depending on the number of records, draw the number of pages (if there are 78 records, then there will be three pages 1, 2 and 3).
Question:
how to do this without hardcode so that when the number of records increases, the number of pages and the corresponding buttons increases?
Thoughts aside to request from base count (record). Divide the resulting number by 30, round up to get the number of pages.
Give wise advice.
PS. the whole thing is cooked in Zend Framework 2, which (for me personally) makes everything much more complicated (it’s difficult through TableGateway)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Melnikov, 2014-08-04
@mlnkv

framework.zend.com/manual/1.12/en/zend.paginator.u...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question