title: How do I align checkboxes side by side while I dynamically create them in php?
body: <p>I m trying to create a form with multiple checkboxes. The checkboxes are dynamically created from a database but they are always created in a new line while I want them to be aligned side by side. I am new to CSS and php/mysql so I m unable to get it right. Can you help me out?    </p>
  
  <blockquote>
    <p>
        
  </blockquote>
  
  <pre><code>$mysqli = new mysqli('localhost', 'mechuser', 'mypassword', 'mechug_lab');
  
  $query = "SELECT * FROM slots WHERE lab_id = '530_335' AND slot_status = '0' AND expt_id='3'";
  $result=mysql_query($query);
  
  if($result) {
                  if(mysql_num_rows($result) != 0) {
                      $date = "0000-00-00";
                      while($row = mysql_fetch_array($result)):
                      ?&gt;
                      &lt;div&gt;&lt;label&gt;&lt;?php
                      $date1 = $row['date'];
                      $weekday = date('D', strtotime($date1));
                      $today = date('M j, Y',strtotime($date1));
                      if ($date1 != $date)
                          echo "&lt;strong&gt;".$today."   ".$weekday."&lt;/strong&gt; &amp;nbsp";
                          echo " ".$row['slot_time'];
                          $date = $date1;
                      ?&gt;
                      &lt;input type="checkbox" name="bookings[]" value="1"&gt;&lt;/label&gt;&lt;/div&gt;&lt;?php endwhile;
                      }
                      }
                      ?&gt;
  </code></pre>
  
  <p></p>