isset — Determine whether a variable is set or not! Returns TRUE if var exists; FALSE otherwise. If a variable has been unset with unset(), it will no longer be set. isset() will return FALSE if testing a variable that has been set to NULL. isset() only works with variables as passing anything else will result in a parse error. For checking if constants are set use the defined() function.
<?php session_start(); if(isset($_SESSION['views'])) $_SESSION['views'] = $_SESSION['views']+ 1; else $_SESSION['views'] = 1; echo "views = ". $_SESSION['views']; ?>
The above script is checking that ‘views’ or $views variable is set in session or not.