let’s straight to the point…
for example, I have Country and City database like this :
+—————+——————+
|CountryName |CityName |
+—————+——————+
| US | Washington |
| US | Chicago |
| US | Miami |
<— until 100 rows for US —>
| UK | London |
| UK | Chelsea |
| UK | Tottenham |
<— until 100 rows for UK —>
<— there are 200+ country name —>
and here’s what I want to do with PHP :
Country Name : US
-
City : Washington
-
City : Chicago
-
City : Miami
——– >> LIMIT 10 City Only ——>> SEE PAGE 2 TO SEE MORE
Country Name : UK
-
City : London
-
City : Chelsea
-
City : Tottenham
——– >> LIMIT 10 City Only ——>> SEE PAGE 2 TO SEE MORE
——– >> LIMIT 10 COUNTRY Only ——>> SEE PAGE 2 TO SEE MORE
can it be done with PHP? How to do multiple / nested Pagination like this? thanks.
Where
$per_page is the ammount of entries per page, in this case, 10
$start is where it starts, normally (page number – 1 * $per_page)