PHP - Sessions and Cookies
Given the following PHP code:
What will be displayed when the page is loaded for the third time in the same session?
session_start();
if (empty($_SESSION['visits'])) {
$_SESSION['visits'] = 1;
} else {
$_SESSION['visits'] += 1;
}
echo $_SESSION['visits'];What will be displayed when the page is loaded for the third time in the same session?
