Answer the question
In order to leave comments, you need to log in
How to make an array in $_COOKIE?
I have a piece of PHP code
$_SESSION["logged_user"] = $users_log_res; //$users_log_res это массив
setcookie( "logged_user", $users_log_res, time()+604800 );
and it tells me that: Answer the question
In order to leave comments, you need to log in
Cookies can only contain a string. If array then json_encode do
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question