Variable = Session Wont Work?


<?php
session_start();
$userid= $_SESSION["userid"];
echo $_SESSION["userid"];
echo "$userid";

/*Output
4

*/

Why can’t I set the session value to a variable and output it?