how to start and end the session 

<?php
session_start();
if(isset($_SESSION[‘views’]))
¬† unset($_SESSION[‘views’]);
?>

WE can also completely destroy the session by calling the session_destroy() function:
<?php
session_destroy();
?>