MySQL select query based on array value
<p>I have a dynamic array. For example  like this. </p>

<pre><code>$color = array('red','blue','green');
"SELECT * FROM mytable where colors=(red or blue or green)"
</code></pre>

<p>But my array is dynamic. So I don't know the values and how can I loop the array and select the rows.</p>