session_encode

string session_encode(void) 

Encodes session data.

Returns:

Session string; FALSE on error

Description:

Encodes current session data into a session string. This is the same format in which session data is stored.

Version:

Existing since version 4.0

Example:

Encode session data
session_start(); 
if (!$counter) {
   $counter=10; 
   session_register("counter"); 
} 
echo $counter; 
echo session_encode(); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.