I am generating cookies from a list, when the user clicks the line they want it writes a cookie, so if they select 3 line we could have cookies SNF01, SNF02 and SNF11, for example. What I am struggling with is then reading them back as the prefix is the same but of course the numbers could be anything.
You should be creating a single cookie with an array of values being contained by the cookie.
So you always know you can access the cookie via “abc” and that it will contain at least on value in the array
abc = Array
(
[0] => SNF01
[1] => SNF02
[2] => SNF03
)