robb73 Posted January 8, 2009 Share Posted January 8, 2009 I'm trying to work out how to assign a value to a session array without stating it's key value. I understand that: $Namespace->key = 'value' is the same as $_SESSION['Namespace']['key'] = 'value' ... but I'm struggling to understand or find info on the syntax to achieve the following in ZF: $_SESSION['Namespace'][] = 'value' Any help would be gratefully appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/139977-zend-framework-session-assign-value-without-declaring-key/ Share on other sites More sharing options...
robb73 Posted January 9, 2009 Author Share Posted January 9, 2009 Can't be done. I've been through the session classes; always requires a key value otherwise throws a Zend Session Exception. Quote Link to comment https://forums.phpfreaks.com/topic/139977-zend-framework-session-assign-value-without-declaring-key/#findComment-733184 Share on other sites More sharing options...
Daniel0 Posted January 11, 2009 Share Posted January 11, 2009 Why would you try to do that in the first place? Quote Link to comment https://forums.phpfreaks.com/topic/139977-zend-framework-session-assign-value-without-declaring-key/#findComment-734637 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.