title: setting default value in dropdownlist
body: <p>I have a Drop down List consisting of 3 values(pending,delivered,processing). I have to set the default value as the one from the database.The default value should be the status corresponding to the particular order in the database.so can you please suggest the query to set the default value in the drop down list. </p>
  
  <pre><code>echo $this-&gt;Form-&gt;input('status', array(
      'empty'=&gt;$r,
      'options' =&gt; array(
          'pending' =&gt;'pending', 
          'delivered' =&gt; 'delivered',
          'processing' =&gt; 'processing')
  ));
  </code></pre>
  
  <p>here $r contains the value of the status fetched from database</p>