I have a code that saves data to a cookie. and the data saved in the cookie is like this:
(%22Lynyrd%20Skynyrd%22%3D%3Earray(%226983887641%22)%2C%20(%22Rod%20Stewart%22%3D%3Earray(%2259088763306%22)%2C%20(%22Led%20Zeppelin%20Official%22%3D%3Earray(%22131572223581891%22)%2C%20(%22Black%20Sabbath%22%3D%3Earray(%2256848544614%22)%2C%20(%22Hadag%20Nahash%20%D7%94%D7%93%D7%92%20%D7%A0%D7%97%D7%A9%22%3D%3Earray(%22116542622632%22)%2C%20
and when i read it with this php:
<?php
if (isset($_COOKIE["currentsearchctrl"])) {
$cookz = $_COOKIE["currentsearchctrl"];
echo $cookz;
} else {
echo 'cookie not set';
} ?>
It returns with this:
(\"Lynyrd Skynyrd\"=>array(\"6983887641\"), (\"Rod Stewart\"=>array(\"59088763306\"), (\"Led Zeppelin Official\"=>array(\"131572223581891\"), (\"Black Sabbath\"=>array(\"56848544614\"), (\"Hadag Nahash הדג נחש\"=>array(\"116542622632\"),
The problem are the backslashes. I was going to: $data = array($cookz); but it doesn't work.
any ideas?