Like this:
I set a cookie to know whti items the visitor has seen
SetCookie("SeenItem$id3",$id3,time()+72000,"/saljnat","www.eye-q.nu",0);
This could set the name of the variable to
$SeenItem100 and the value to 100.
Then i need to compare the value to the id of the fetced items in a loop.
I did like this.
$seen="SeenDiscitem$id";
$seen="$$seen";
IF ($seen != "$id") $new="<img src=\"gfx/new.gif\">";
But it always evaluates to true on the first loop and false on the rest.