I am creating a website where one can post things and others can comment and like them. But the problem is that i want to store the id of the post into a cookie so that the person can only like it 1 time. I am storing multiple ids into an array and then into a cookie.
When i want to retrieve it, i am using the explode() function. How can i get all the values inside the array? Because it is quite tedious to do this:
Code: Select all
$cookie_liked[0];
$cookie_liked[1];
$cookie_liked[2];
$cookie_liked[3];Any help is appreciated. Thnx!