Simple Answer is,
If you have a login page and some user logged in. Now you want to store his information like username, fullname, age etc for the session, then you will have to store this data in the $_SESSION variable and the assignment operator '=' is used to assign the value of variable at right hand side to the varaible at left hand side of the operator. So, you have to do,
$_SESSION['user'] = $username;
But if, you are now on a page that shows on the top, the username of the logged in user, you have to get the data stored in the session variable. This time you have to do,
$username = $_SESSION['user'];
Obviously, both the statements are correct to their purpose. I hope it helped. :)
With Regards
Tushar Srivastava