title: Two PHP tables side by side
body: <p>I am new to PHP; please help me.</p>
  
  <p>I am trying to align two PHP tables with images in them side by side but they are displaying one below the other. I want two tables side by side under one heading and two tables side by side under second heading. I've seen some solutions in HTML but I am looking for PHP. Please find screenshot of my error and my code below:</p>
  
  <p>Please feel free to ask for any clarifications.</p>
  
  <pre><code>$prodcatSQL="select prodcatid, prodcatname, prodcatimage from prodcat"; // create an $sql variable and store the sql statement
  
  $exeprodcatSQL=mysql_query($prodcatSQL) or die (mysql_error());
  
  while ($arrayprod=mysql_fetch_array($exeprodcatSQL))
  
  
  {
  
      echo "&lt;strong&gt;Using display: inline-block; &lt;/strong&gt;&lt;br&gt;\n"; 
      echo "&lt;table border=1 class=\"inlineTable\"&gt;\n"; 
      echo "&lt;tr&gt;\n"; 
      echo "&lt;td&gt;&lt;p&gt;&lt;a href=products.php?u_prodcatid=".$arrayprod['prodcatid']."&gt;";
      echo $arrayprod['prodcatname'];
      echo "&lt;p&gt;&lt;img src=images/".$arrayprod['prodcatimage']."&gt;&lt;/p&gt;";
      echo "&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;\n";
      echo "&lt;/tr&gt;\n";
      echo "&lt;/table&gt;\n";
  }
  
  
  echo "&lt;h3&gt;&lt;center&gt;".$subheading."&lt;/center&gt;&lt;/h3&gt;"; 
  
  $treatcatSQL="select treatcatid, treatcatname, treatcatimage from treatcat"; // create an $sql variable and store the sql statement
  
  $exetreatcatSQL=mysql_query($treatcatSQL) or die (mysql_error());
  
  while ($arrayprod=mysql_fetch_array($exetreatcatSQL))
  
  
  {
  
  
      echo "&lt;strong&gt;Using display: inline-block; &lt;/strong&gt;&lt;br&gt;\n"; 
      echo "&lt;table border=1 class=\"inlineTable\"&gt;\n"; 
      echo "&lt;tr&gt;\n"; 
      echo "&lt;td&gt;&lt;p&gt;&lt;a href=treatmentpackages.php?u_treatcatid=".$arrayprod['treatcatid']."&gt;";
      echo $arrayprod['treatcatname'];
      echo "&lt;p&gt;&lt;img src=images/".$arrayprod['treatcatimage']."&gt;&lt;/p&gt;";
      echo "&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;\n";
      echo "&lt;/tr&gt;\n";
      echo "&lt;/table&gt;\n";
  }
  </code></pre>