kalster Posted March 27, 2014 Share Posted March 27, 2014 in the code below, $b could be any value. consider that many cookies have been created with the increment of $b. i need to delete all cookies of $b and regardless of the value. setcookie("read" . $a . $b, '', time()-10000); so when the code below is as follows... setcookie("read" . 1 . 5, '', time()-10000); setcookie("read" . 1 . 6, '', time()-10000); ...then i need to delete all occurrences of the cookies. Quote Link to comment Share on other sites More sharing options...
requinix Posted March 27, 2014 Share Posted March 27, 2014 Loop through $_COOKIE and delete any cookie that matches that name "pattern". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.