How does session work in CodeIgniter? – IT-QA.COM
If you want to get a session id, you can use the session_id function, as shown in the following snippet. session_start(); echo session_id(); How can we destroy a session? A PHP session can be destroyed by session_destroy() function. This function does not need any argument and a single call can destroy all the session variables.