如何将php的cookie转化成对象或数组
时间:2021-07-01 10:21:17
帮助过:3人阅读
怎么将php的cookie转化成对象或数组?
怎么将php的cookie转化成对象或数组?
echo $_COOKIE['drres'];
/* -------
得到这样的字符串"{\"filter_last\":\"category\",\"user_last\":\"linjuming@xx.com\"}"
怎么转化成数组或对象啊?
------- */
?>
------解决方案--------------------
print_r(json_decode("{\"filter_last\":\"category\",\"user_last\":\"linjuming@xx.com\"}"));
?>