Im trying to build a little site using XML instead of a database.
I would like to build a next and prev button which will work relative to the content I have displa
The internal array pointer is mainly used for looping over an array within one PHP script. I wouldn't recommend using it for moving from page to page.
For that, just keep track of the page number and the page size (number of items per page). Then, when you're loading another page, you can use them to decide which array items to show. For example:
$pageNum = $_GET["pageNum"];
$pageSize = 10;
$startIndex = ($pageNum - 1) * $pageSize;
$endIndex = ($startIndex + $pageSize) - 1;
(or something similar)