I am trying to do this:
setCookie('visitor', array(0 => 'one', 1 => 'two'), time()+3600, COOKIEPATH, COOKIE_DOMAIN, false);
But I am unable to get it work. The php reference explains "$value as string[optional]" which (as far as my understanding goes) should accept an array of string as argument. Please help me achieve something similar to this or correct me if my understanding of the php reference ( string[optional] ) is wrong.
Here is the setcookie function declaration:
setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);