Опитайте това:
$sql = "SELECT *
FROM albums
WHERE name NOT IN ( '" . implode( "', '" , $ban_album_names ) . "' )";
Опитайте това:
$sql = "SELECT *
FROM albums
WHERE name NOT IN ( '" . implode( "', '" , $ban_album_names ) . "' )";