title: PHP MySQL - Database has relation ids in array, but php not showing it
body: <p>I am facing a problem. I had two columns holiday1, holiday2 and I combined them into one using <code>update tbl_entries set total_holidays = concat(holiday1, holiday2)</code> - this works and the result is as expected, my total_holidays is now <code>Saturday, Sunday</code>.</p>
  
  <p>I replaced the value <code>Saturday, Sunday</code> with 6, 7 using <code>REPLACE(total_holidays, "Sunday", "7"); REPLACE(total_holidays, "Saturday", "6");</code></p>
  
  <p>I created a new table called <code>all_holiday_types</code> which will hold the holiday name and id for each type of holiday (example: ID 1 for Monday ... ID 7 for Sunday).</p>
  
  <p><strong>The Problem</strong></p>
  
  <p>In my php, what I am trying to do is iterate through the list of holidays in a multiple select, and show the holidays for each record from <code>total_holidays</code> column. Clearly this is not happening. The multiple select has selected all items (Monday .. Sunday), but in my database the <code>total_holidays</code> field is <code>6,7</code> - so technically it must show <code>Saturday, Sunday</code>. - <strong>Anyone know what is causing this issue?</strong></p>
  
  <p>Also, I have done the same thing with other similar columns and they all seem to work. Only this seems to have the problem.</p>
  
  <p><strong>Below is my code:</strong></p>
  
  <pre><code> &lt;select class="form-control show-tick" data-plugin="selectpicker" name="total_holidays[]" multiple="multiple"&gt;
  &lt;?php $inst=explode(",", $data-&gt;total_holidays);
        $holidays=mysql_query("SELECT * FROM `all_holiday_types`");
        while($holiday=mysql_fetch_object($holidays)){?&gt;
           &lt;option value="&lt;?php echo $holiday-&gt;id; ?&gt;" &lt;?php if(in_array($holiday-&gt;id, $inst)){ echo 'selected'; } ?&gt;&gt;&lt;?php echo $holiday-&gt;holiday; ?&gt;&lt;/option&gt;
        &lt;?php } ?&gt;
  </code></pre>