I created index.php that basically looks up all the individual php files (articles) in a few subfolders and prints them out. Since the quantity of articles is over 30 and growing, I implemented a multi-page solution using PHP session(). So, page2.php simply prints out the second part of my array titled "page2" and page3.php prints out the third part of my array titled "page3". These array parts are arrays themselves (it's an array of arrays).
All works fine.
However, this requires me to hard code "page2.php", "page3.php", etc. This will get out of hand at some point.
How would you guys handle this? Can I dynamically create "pageX.php" upon user clicking the "Next" button? Or, should I do some type of AJAX solution? Is there a standard way of doing a multipage PHP index?