ehdesign Posted August 24, 2007 Share Posted August 24, 2007 Can I do this - $_SESSION['this'][$x] - I need to have mutiple dimensional $_SESSION array???? Any help / thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/66429-solved-multiple-dimension-session-array/ Share on other sites More sharing options...
hitman6003 Posted August 24, 2007 Share Posted August 24, 2007 Can I do this - Have you tried it? Quote Link to comment https://forums.phpfreaks.com/topic/66429-solved-multiple-dimension-session-array/#findComment-332528 Share on other sites More sharing options...
trq Posted August 24, 2007 Share Posted August 24, 2007 Have you tried? The $_SESSION array is no different to any other array besides the fact that it has some persistence. Quote Link to comment https://forums.phpfreaks.com/topic/66429-solved-multiple-dimension-session-array/#findComment-332529 Share on other sites More sharing options...
MadTechie Posted August 24, 2007 Share Posted August 24, 2007 i think you should try it.. start with $_SESSION['test'] = "hello"; then $_SESSION['test']['test2'] = "hello"; remember print_r($_SESSION); helps Quote Link to comment https://forums.phpfreaks.com/topic/66429-solved-multiple-dimension-session-array/#findComment-332530 Share on other sites More sharing options...
teng84 Posted August 24, 2007 Share Posted August 24, 2007 if this thing work then i should say its better $array=array(value here); $_SESSION['cc']=$array; Quote Link to comment https://forums.phpfreaks.com/topic/66429-solved-multiple-dimension-session-array/#findComment-332534 Share on other sites More sharing options...
clearstatcache Posted August 24, 2007 Share Posted August 24, 2007 i olwez prefer having a multiple dimension array nd then assigning this array to $_SESSION var... say.... $array['test'][0] = 0; $array['test'][1] = 1; $array['test1'][0] = 10; $array['test'][1] = 11; $_SESSION['array'] = $array; Quote Link to comment https://forums.phpfreaks.com/topic/66429-solved-multiple-dimension-session-array/#findComment-332644 Share on other sites More sharing options...
ehdesign Posted August 24, 2007 Author Share Posted August 24, 2007 I had tried it and was seeing problems. But I think I found the issue aside from this. So, the problem is solved. Thanks. I like the idea of putting the info into a standard array and then throwing that whole array into the session array... I'll mark this as solved. Great job. Quote Link to comment https://forums.phpfreaks.com/topic/66429-solved-multiple-dimension-session-array/#findComment-332916 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.