cookies from json to string in javascript to set cookies
cookies from array to string in PHP