title: Dynamic drop down menus using CSS and PHP/MySQL
body: <p>I want to create a dynamic drop down menu using PHP and MySQL. Menus is OK  but not the way I wanted.</p>
  
  <p>I want the menu like this as below (sorted vertically and limiting number of items vertically and horizontally)</p>
  
  <p><img src="https://i.stack.imgur.com/kk43c.png" alt="enter image description here"></p>
  
  <p>I tried achieving this as per below code:</p>
  
  <pre><code>&lt;?php foreach ($result as $riw) { ?&gt;
  &lt;div class="four columns"&gt;
  &lt;li&gt;&lt;a href="&lt;?php echo $riw['fmprmlink']; ?&gt;"&gt;&lt;?php echo 
       $riw['remedy_name']; ?&gt;&lt;/a&gt; &lt;/li&gt;
  &lt;/div&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>By above approach i am getting this as a result which is not rquired</p>
  
  <p><img src="https://i.stack.imgur.com/l6Jb9.png" alt="enter image description here"></p>
  
  <p>and without using <code>&lt;div class="four columns"&gt;</code> the result is as below which is again not required</p>
  
  <p><img src="https://i.stack.imgur.com/gZO1z.png" alt="enter image description here"></p>
  
  <p>I want items to be arranged and shown alphabetically vertically.</p>