title: Show Data Horizontally in Table using PHP & MySQL
body: <p>I'm trying to display data horizontally in a table by using PHP &amp; MySQL. The code that I'm currently using is (Obviously all values will be called from MySQL but currently I have put static values):-</p>
  
  <pre><code>$query = "select * from bonusdetails where BonusType='Free Money' order by Validity ASC limit 0,3;";
  $result = mysql_query($query);
  echo '&lt;table width="150" border="0" cellspacing="0" cellpadding="0" bgcolor="#941010" style="font-family:Arial, Helvetica, sans-serif; float:left; color:#ffffff;"&gt;';
  
  while ($row = mysql_fetch_array($result))
  {
              echo '&lt;tr&gt;';
      echo '&lt;td align="center" style="padding:2px 0 0 0;"&gt;&lt;img src="abc.jpg" width="124" height="64"/&gt;&lt;/td&gt;';
      echo '&lt;/tr&gt;';
  
                  echo '&lt;tr&gt;';
      echo '&lt;td align="center" style="font-size:15px; padding:8px 0 0 0;"&gt;No Deposit Bonus&lt;/td&gt;';
      echo '&lt;/tr&gt;';
  
                  echo '&lt;tr&gt;';
      echo '&lt;td style="font-size:17px; padding:5px 0 0 0;" align="center" &gt;CODE: STAR75&lt;/td&gt;';
      echo '&lt;/tr&gt;';
  
                  echo '&lt;tr&gt;';
      echo ' &lt;td align="center" style="padding:8px 0 5px 0;"&gt;&lt;a href="#"&gt;&lt;input name="more-details" type="button" style="background:url(images/more-details.png) no-repeat; width:102px; 
      height:27px; text-decoration:none; border:none; cursor:pointer;" /&gt;&lt;/a&gt;&lt;/td&gt;';
      echo '&lt;/tr&gt;';
  
      }
  
  echo '&lt;/table&gt;';
  </code></pre>
  
  <p>I'm getting output in this format: <code>http://www.casinobonustips.com/submitbonus/bonus.php</code>. is there a way to display the same data horizontally?</p>
  
  <p>I will highly appreciate your assistance on this.</p>
  
  <p>Thanks and Regards,
  Devjeet</p>