title: Link Printing two times
body: <p>I am getting an error while printing content using <code>for each</code>. The values are being retrieved from three tables using foreign key. All the data from the three table are working fine like Id passing etc. The problem is in the printing data.  It was printing the same title and link two times like:</p>
  
  <p><strong>Link name 1</strong> Link name2 <strong>Link name 1</strong> Link name2    </p>
  
  <p>Below I have added my code:</p>
  
  <p><strong>Connection</strong> </p>
  
  <pre><code>'connect/MysqlConnect.php';
  $con = MysqlConnect::getInstance();
  $page = $_GET['page'];
  $powerpoint=$con-&gt;select("SELECT * FROM `category`WHERE `cid` = " . MysqlConnect::dbEscape($page), false);
  $powerpoint1=$con-&gt;select("select link.linkid,link.link from link inner join category on link.cid = " . MysqlConnect::dbEscape($page),true );
  $powerpoint2=$con-&gt;select("select link.linkid,link.link from link inner join category on link.cid = category.cid");
  </code></pre>
  
  <p><strong>Link Printing code</strong></p>
  
  <pre><code>&lt;?php foreach($powerpoint1 as $row){?&gt;
      &lt;a href="download.php?page=&lt;?php echo $row['linkid']; ?&gt;"&gt;&lt;?php echo $row['link'];?&gt;&lt;/a&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>Screen shot <a href="https://i.stack.imgur.com/g87qT.jpg" rel="nofollow noreferrer">http://i.stack.imgur.com/g87qT.jpg</a></p>