i am using cookie first time in Yii… i am referring This wiki link. now i am able to create cookie and now i stuck in "How to update cookie value"?
in my case…
Yii::app()->request->cookies['username']=new CHttpCookie('username',''); // my created cookie
[b]
how can define cookie value as array?[/b]
Yii::app()->request->cookies['username']=new CHttpCookie('username',array());
now i want to update my cookie with updated array…
$username = array_push(Yii::app()->request->cookies['username'], Yii::app()->user->username);
is it possible to update cookie array() like this?
Yii::app()->request->cookies['username']=$username;
how can i do this? can anyone help me…
Thanks in advance