echo session
print_r($_SESSION);
Here is what the above code is Doing:
1. We’re creating a session variable called ‘name’ and setting it to ‘John Doe’.
2. We’re creating a session variable called ‘age’ and setting it to ’30’.
3. We’re creating a session variable called ‘city’ and setting it to ‘New York’.
4. We’re printing out the session variables.