anurodh
anurodh

Reputation: 295

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.

Upvotes: 0

Views: 1092

Answers (1)

Adrian World
Adrian World

Reputation: 3128

How about putting an actual value:

$this->session->email['client'] = '[email protected]';
$this->session->email['admin']  = '[email protected]';

or better yet like this

$users = array(
    'client' => '[email protected]',
    'admin'  => '[email protected]'
);
$this->session->email = $users;

Upvotes: 2

Related Questions