title: Two Table headings printed on webpage
body: <p>I have to following problem, after running script below it prints out an extra header at the end?</p>
  
  <p>What I am doing is getting data from two tables, with certain parameters then placing them into a table.  The echo $result at the end is just to see what is still inside $result and it prints out a value before the extra header as well as right after the header.</p>
  
  <p>How can I get around that?</p>
  
  <pre><code>        extract(shortcode_atts(array(
                  "countryid"=&gt;'',
              ), $atts));
  
  
  // Setting up variables
  // Get all the data from the "example" table
  
          $joburl = "http://www.x.co.za/job/view/";
          $result = mysql_query("SELECT wpjb_job.company_name , wpjb_job.job_category , wpjb_job.job_country ,
                                          wpjb_job.job_title , wpjb_job.job_slug , 
                                          wpjb_category.id ,  wpjb_category.title 
                                      FROM wpjb_job 
                                          INNER JOIN wpjb_category ON wpjb_job.job_category = wpjb_category.id
                                          WHERE job_country='$countryid'
                                          AND(is_filled='0' AND is_active='1')
                                          ORDER BY job_title") 
                      or die(mysql_error());
  
          echo "&lt;table border='1'&gt;";
          echo "&lt;tr&gt; &lt;th&gt;Job&lt;/th&gt; &lt;th&gt;Company&lt;/th&gt; &lt;th&gt;Industry&lt;/th&gt; &lt;/tr&gt;";
  
  // keeps getting the next row until there are no more to get
  
      while($row = mysql_fetch_array( $result )) {
  
  // Print out the contents of each row into a table
  
          echo "&lt;tr&gt;&lt;td&gt;"; 
          echo '&lt;a href ="http://www.x.co.za/job/view/'.$row['job_slug'].'"&gt; '.$row['job_title'].' &lt;/a&gt;';
          echo "&lt;/td&gt;&lt;td&gt;"; 
          echo $row['company_name'];
          echo "&lt;/td&gt;&lt;td&gt;";
          echo $row['title'];
          echo "&lt;/td&gt;&lt;/tr&gt;"; 
      } 
      echo "&lt;/table&gt;";
      echo $result;
      }
  </code></pre>