title: how to select all the checkboxes by default in cakephp?
body: <p>I want to select all check boxes by default in cakephp, how can I do that      </p>
  
  <pre><code> $selected = $this-&gt;Form-&gt;input('user_id')                  
  
   &lt;?php echo $form-&gt;input('user_id', 
                                  array(
                                  'multiple'=&gt;'checkbox',
                                      'options'=&gt;$user,
                                      'checked'=&gt;$selected
                                  )   
                              );
                  ?&gt;
  </code></pre>
  
  <p>I have followed following links but didn't get success<br>
  <a href="https://stackoverflow.com/questions/1962463/cakephp-how-to-set-checkbox-to-checked">cakephp: How to set checkbox to checked?</a><br>
  <a href="https://stackoverflow.com/questions/12168225/multiple-checkboxes-in-cakephp-how-to-set-which-are-checked">Multiple checkboxes in CakePHP - how to set which are checked?</a> </p>