PHP:How to create session display and unset session in php

Hello everyone in this tutorial I will show you how
to create session,display session, unset and destroy session

Steps —
1) First create a php page and start the session using the

2) Then declare and initialize session variables
using the following code.

3) If you want to add array to a session veriable
use following code


4) Now create another php page and display
the session value;

5) Now create another page and unset session that are

6) Now execute that file

7) Now run the file where session value displayed,
if this page shows undefined index error that means
you have unset session.

Thank you for watching this video