how do you mean?
you want to number each php-script you have? or do you have an output (like a forum, onlineshop etc) that you want to chunk up.
1) numbering you php-files: do it with en external text-file. write the name of the file and add a number:
index.php|1
main.php|2
You can then get the name of the php-script with
$PHP_SELF
and figure out the page-number from your textfile. That helps you to reorganize you project when adding or removing files from it.
2) splitting huge pages up:
When using a DB it is simple. First, get the number of rows:
SELECT COUNT(`ID`) FROM ...
. You can then restrict the output from MySQL for instance with
LIMIT 0,9
. That gives you the first 10 entries from you query. On page two you use
LIMIT 10,19
for the next ten entries and so on.
Using a textfile-system it is a bit fuzzier. Write similar functions like getallentries, getlimitedentries, and so on to keep you code tidy.