I have the following that stores the previous 10 URL\'s into a session:
function curPageURL() { $pageURL = \'http\'; if ($_SERVER[\"HTTPS\"] == \"on\") {$pageU
instead of $_SESSION['pages'][] = $CurrentPage try $_SESSION['pages'][$CurrentPage] = 1
$_SESSION['pages'][] = $CurrentPage
$_SESSION['pages'][$CurrentPage] = 1
/edit: to keep items sorted, unset first:
unset($_SESSION['pages'][$CurrentPage]); $_SESSION['pages'][$CurrentPage] = 1;