title: check the check-boxes using array values in cakephp
body: <p>I am creating HTML checkboxes using <strong>cakePHP</strong> like : </p>
  
  <pre><code>&lt;?php echo $this-&gt;Form-&gt;checkbox('medicine_time.0', array('value' =&gt; 'morning', 'div' =&gt; false, 'label' =&gt; false)); ?&gt; Morning &amp;nbsp;
  &lt;?php echo $this-&gt;Form-&gt;checkbox('medicine_time.1', array('value' =&gt; 'noon', 'div' =&gt; false, 'label' =&gt; false)); ?&gt; Afternoon &amp;nbsp;
  &lt;?php echo $this-&gt;Form-&gt;checkbox('medicine_time.2', array('value' =&gt; 'eve', 'div' =&gt; false, 'label' =&gt; false)); ?&gt; Evening &amp;nbsp;
  &lt;?php echo $this-&gt;Form-&gt;checkbox('medicine_time.3', array('value' =&gt; 'night', 'div' =&gt; false, 'label' =&gt; false)); ?&gt; Night &amp;nbsp;
  </code></pre>
  
  <p>While this, i have an array which values will decide if <strong><em>checkbox</em></strong> will be <strong>checked</strong> or <strong>not</strong></p>
  
  <p>array : </p>
  
  <pre><code>[medicine_time] =&gt; Array
        (
           [0] =&gt; morning
           [1] =&gt; noon
           [2] =&gt; 0
           [3] =&gt; night
        )
  </code></pre>
  
  <p>Now, If I have <strong><em>morning</em></strong>, my first checkbox with <strong>same value</strong> should be checked and so on. 
  OR if I modify same array to : </p>
  
  <pre><code>[medicine_time] =&gt; Array
        (
           [0] =&gt; morning
           [1] =&gt; noon
           [2] =&gt; night
        )
  </code></pre>
  
  <p>would it help?</p>
  
  <p>How could I achieve it? or any other way to do it?</p>