woolyg Posted December 19, 2007 Share Posted December 19, 2007 Hi all, another $_SESSION question from me - if I had <?php $number = "2"; ?> is it possible to set $_SESSION['account_$number'] = 'true' ... and would that effectively create $_SESSION['account_2'] = 'true' ?? Woolyg. Quote Link to comment Share on other sites More sharing options...
papaface Posted December 19, 2007 Share Posted December 19, 2007 Yeah thats correct. If you want it boolean then you go: $_SESSION['account_$number'] = true; Quote Link to comment Share on other sites More sharing options...
corbin Posted December 19, 2007 Share Posted December 19, 2007 $_SESSION["account_{$number}"] = true; or $_SESSION['account_' . $number] = true; Quote Link to comment Share on other sites More sharing options...
papaface Posted December 19, 2007 Share Posted December 19, 2007 $_SESSION["account_{$number}"] = true; or $_SESSION['account_' . $number] = true; lol I didn't see that variable in the name of the session Quote Link to comment Share on other sites More sharing options...
corbin Posted December 19, 2007 Share Posted December 19, 2007 I didn't when I first read it.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.