title: How to show the city list in selectbox and the city list will be coming from database in cakephp
body: <p>I have a cities table in my database that contain the list of city and each city has their own id(Unique).</p>
  
  <p>Now I want to show the list of city in a select box in my view page so that user can select the city from them.</p>
  
  <p>I am using the below code in my controller:</p>
  
  <pre><code>$sql = mysql_query("select * from cities ORDER BY city_name");
  if(mysql_num_rows($sql)&gt;0){
  
      while($row=mysql_fetch_array($sql))
      {
          echo '&lt;option value="'.$row['city_name'].'"&gt;'.$row['city_name'].'&lt;/option&gt;';
      }
  }
  else
  {
      echo '&lt;option selected="selected"&gt;No data&lt;/option&gt;';
  }
  </code></pre>
  
  <p>What code should I use in view to show the list if city in the select box?</p>