How to fetch results in an array with ZF2
<p>I am trying to get some distinct values from DB with ZF2 using Tablegateway.</p>

<pre><code>    $select = $this-&gt;sql-&gt;select($tableGateway-&gt;getTable());

    $select-&gt;columns(array('city'));
    $select-&gt;quantifier('DISTINCT');

    $stm = $this-&gt;sql-&gt;prepareStatementForSqlObject($select);
    $res = $stm-&gt;execute();
    return $res;
</code></pre>

<p>This is returning an Iterate object, and I would like to have all the cities in an array. How can I do this ?</p>