How do I use PHP to auto-increment a numeric variable on page refresh?
Foe example, for $i=10 there is an output of this:
$i=10
Page has be
You would need to store its state somewhere, perhaps in the $_SESSION.
$_SESSION
session_start(); $i = isset($_SESSION['i']) ? $_SESSION['i'] : 0; echo ++$i; $_SESSION['i'] = $i;