rondog Posted July 13, 2009 Share Posted July 13, 2009 I am storing an array in a session. Is it possible to call that session by an object name like (This is how objects work in actionscript..not sure how they do in php): $_SESSION['userInfo'].username; $_SESSION['userInfo'].email; rather than: $_SESSION['userInfo'][0]; $_SESSION['userInfo'][1]; Link to comment https://forums.phpfreaks.com/topic/165813-solved-php-object/ Share on other sites More sharing options...
haku Posted July 13, 2009 Share Posted July 13, 2009 $_SESSION['userInfo']['username'] = 'rondog'; $_SESSION['userInfo']['email'] = [email protected]; echo $_SESSION['userInfo']['username']; echo '<br />'; echo $_SESSION['userInfo']['email']; The output of this will be: rondog [email protected] Link to comment https://forums.phpfreaks.com/topic/165813-solved-php-object/#findComment-874612 Share on other sites More sharing options...
rondog Posted July 13, 2009 Author Share Posted July 13, 2009 ah perfect, thats what I wanted, thanks! Link to comment https://forums.phpfreaks.com/topic/165813-solved-php-object/#findComment-874616 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.