title: Place checked checkbox array in sql statement
body: <p>I am making a checkbox filter, I need to place the associative array chosen from the chekboxes in the sql statement so that in this case it shows the results of these two categories but I have not yet been able to achieve it if you can help me thanks</p>
  <pre><code>$array_category = array(
  &quot;1&quot; =&gt; &quot;design&quot;,
  &quot;2&quot; =&gt; &quot;food&quot;,
  </code></pre>
  <p>);</p>
  <pre><code>if ($sentence= $db-&gt;query(&quot;SELECT * FROM post WHERE state = 1  AND category IN &quot;.implode(&quot;,&quot;, $array_category).&quot;)&quot;){
  </code></pre>