I get an array to string conversion warning when I try to select using my $name_array variable in the NOT IN clause. I have tried loads of different quotation combinations, but I either get a syntax error or an array to string conversion warning. can anyone see what I'm doing wrong here. Thanks.
$db->query("SELECT contactname
FROM contacts
WHERE contactname
NOT IN (' . implode(",", $name_array) . ')
");
in ('john','peter','jack')