SELECT * FROM (tablename) WHERE (array values) = '1'
<p>I have this question about SQL queries.</p>

<p>Here its is:</p>

<pre><code>$allowed = array("Amsterdam", "Arnhem", "Assen", "Groningen", "Leeuwarden", "Rotterdam", "Sittard", "Tilburg", "Utrecht");

$filter = $db-&gt;prepare("SELECT * FROM users WHERE '$allowed' = '1'");
$filter-&gt;execute;

foreach($filter-&gt;fetchAll(PDO::FETCH_OBJ) as $filtered):

    $amsterdam = $filtered-&gt;amsterdam;
    $arnhem = $filtered-&gt;arnhem;
    $assen = $filtered-&gt;assen;
    $groningen = $filtered-&gt;groningen;
    $leeuwarden = $filtered-&gt;leeuwarden;
    $rotterdam = $filtered-&gt;rotterdam;
    $sittard = $filtered-&gt;sittard;
    $utrecht = $filtered-&gt;utrecht;

endforeach;
</code></pre>

<p>The output (when echoed) is blank.</p>

<p>How can I get the query to look for column names from the array?</p>

<p>All help is appreciated.</p>