storing array in session with zend frame work
I am stuck, I want to store and array in session
my code is something like below
$this->session->email['client'];
$this->session->email[开发者_运维知识库'admin'];
Actually I have 2 users, 1st is client and second is admin. So, want to store both's email.
This is not working for me can anyone suggest me.
How about putting an actual value:
$this->session->email['client'] = 'client@domain.com';
$this->session->email['admin'] = 'admin@domain.com';
or better yet like this
$users = array(
'client' => 'client@domain.com',
'admin' => 'admin@domain.com'
);
$this->session->email = $users;
精彩评论