MDanz Posted October 28, 2010 Share Posted October 28, 2010 how do i set a session array? e.g. set session with variable $value = 13. then set the next $value = 15 . [0] = 13 and [1]=15 how do i set this session. up? so it keeps on updating the array Link to comment https://forums.phpfreaks.com/topic/217090-session-array-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 28, 2010 Share Posted October 28, 2010 The same way you do it for any variable - $_SESSION['some_name'][] = some value; Link to comment https://forums.phpfreaks.com/topic/217090-session-array-help/#findComment-1127490 Share on other sites More sharing options...
MDanz Posted October 28, 2010 Author Share Posted October 28, 2010 thanks... so if i do this $_SESSION['some_name'][] = 13; $_SESSION['some_name'][] = 15; then [0]=13 and [1]=15? Link to comment https://forums.phpfreaks.com/topic/217090-session-array-help/#findComment-1127494 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.