What is session and how to create session in PHP?
Session in PHP are one which store session variables and their values in temporary directory on server.A cookie is called PHPSESSID is automatically sent to the computer of user to store unique session.
//To start PHP session
Session can start using session_start() function.Call to the session_start is done at the beginning. and these session variables are stored in array known as $_SESSION.
echo 'Setting session values';
foreach($_SESSION as $key=>$value)
echo 'The value of $_SESSION['."'".$key."'".'] is'."'".$value."'".' <br />';