Miscellany
public php v1 · immutable//start the sessionsession_start();//check if the counter is set and if not, initialize itif(!isset($_SESSION['counter'])) { $_SESSION['counter'] = 0;}//increment the session counter$_SESSION['counter']++;//display itecho 'Session counter is '.$_SESSION['counter'];