Method: s::get
Gets a session value by key
Info
Syntax
s::get($key=false, $default=null)
Parameters
- $key (mixed) The key to look for. Pass false or null to return the entire session array.
- $default (mixed) Optional default value, which should be returned if no element has been found
Return (mixed)
Example
s::get('username', 'bastian');
// saves the username in the session
echo s::get('username');
// output: 'bastian'