$test = $_GET['nr'];
$class = new class;
echo $class->function($test);
I want $test
to increase after it have fully loaded the page.
The problem is, I don't know how. Looping $test normally will show me a lot of errors. like function cannot be declared again
I've have the same functions names with different functionality. And it's pretty long code.
Anyone have any idea how I can do this? Thanks.
EDIT:
When the page is fully loaded, I want it to add + 1 to $test
and then refresh it with the new variable.
I can do this manually by:
$next = $test + 1;
echo "<a href='/index.php?nr=". $next . "'>Next page</a>";