title: PHP MySQL Query Get Category Name From Multiple ID Array
body: <p>I have category table <code>tb_category</code></p>
  
  <pre><code>categoryid | category_name
  1          | New Product
  2          | Promo
  </code></pre>
  
  <p>And I have product table <code>tb_product</code></p>
  
  <pre><code>productid | product_name | categoryid_fk
  1         | Watch        | 1
  2         | Bag          | 1,2
  </code></pre>
  
  <p>And now I want to get category name from <code>productid</code> = 2 with <code>categoryid_fk</code> = 1,2</p>
  
  <p>How to do that?</p>
  
  <p>My SQL code so far:</p>
  
  <pre><code>//category id --&gt; 1,2
  $qCategory = mysqli_query($con, "SELECT * FROM tb_category WHERE categoryid IN ('" . $dProduct['categoryid_fk'] . "')");
  foreach($qCategory as $cause)
  {
      echo $cause['category_name'];
  }
  </code></pre>
  
  <p>When I run the query I only get the category name with single <code>categoryid</code>.</p>