开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜