Welcome Guest, Not a member yet? Register   Sign In
syntax to access an index of the session variable directly?
#1

[eluser]stormbytes[/eluser]
Looking for the lazy way out...

Assuming 'user' is an array stored in the session via $this->session->set_userdata('user');

Assuming $user has an index 'id', which would normally be accessed via $user['id']

Is there a way to structure a call to the session that would retrieve only the 'id' index?

Tried $this->session->userdata('user')['id']; which didn't work out too well Smile


Messages In This Thread
syntax to access an index of the session variable directly? - by El Forum - 04-19-2011, 08:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB