thanks, why can i not put a variable in IN(), the code below does not work so i just put the variable in after doing the implode e.g.
$result = mysql_query("SELECT * FROM tablename WHERE primarykey IN(".implode(",",$randoms).")");
$randomslist = implode(",", $randoms);
$result = mysql_query("SELECT * FROM tablename WHERE primarykey IN($randomslist)");
Thanks, Im nearly there