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