php function array argument manipulation
<p>i am making insert function that takes $table argument and $cols(as array)argument.
it inserts into given table given values:</p>

<pre><code>$db-&gt;query("insert into $table({$cols[0]},{$cols[1]}) values('{$_POST[{$cols[0]}]}','{$_POST[{$cols[1]}]})");
</code></pre>

<p>this is all nice except i don't how long array is. how to do this??</p>
