asmith Posted January 17, 2008 Share Posted January 17, 2008 hey guys i tried to assign a numeric key to a session : $_SESSION[45] = "yes"; it is wierd , on my site i did , it do not work , i changed that to : $_SESSION[t45] = "yes"; it worked. (i put a print_r of session to see its there or not) i was surprized , and opened a note pad and did : <?php $_SESSION[45] = "yes"; ?> and got a print_r, and it accepted the numeric key . what's wrong with my site that do not accept numeric keys for session ? anyone had the same experience? Link to comment https://forums.phpfreaks.com/topic/86423-solved-session-problem/ Share on other sites More sharing options...
mmarif4u Posted January 17, 2008 Share Posted January 17, 2008 I am not sure whether it will work or not but try it like this: $_SESSION['45'] = "Yes"; Or read this for more details: http://bugs.php.net/bug.php?id=40274 Link to comment https://forums.phpfreaks.com/topic/86423-solved-session-problem/#findComment-441670 Share on other sites More sharing options...
asmith Posted January 17, 2008 Author Share Posted January 17, 2008 I am not sure whether it will work or not but try it like this: $_SESSION['45'] = "Yes"; won't work ! but that link , yea exactly my problem. so it is a bug in php . oh well thanks for the link, helped! Link to comment https://forums.phpfreaks.com/topic/86423-solved-session-problem/#findComment-441682 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.