I am trying to save a session as either 1 or 0 and setup its key via another variable. Although when I go to use the SESSION data, it is not there. I am using the below code and would appreciate any advice.
session_start();
$num ='1';
$_SESSION[$num] =='0';
if(isset($_SESSION[$num])){
echo 'ran';
}
This is comparison, not assignment:
Use a single equals sign: