title: Echoing results as file hyperlinks
body: <p>I am creating a table by echoing results out as the following:</p>
  
  <p>include 'database.php';</p>
  
  <pre><code>$pdo = Database::connect();
  $sql = 'SELECT * FROM kayitlar ORDER BY id DESC';
  
  foreach ($pdo-&gt;query($sql) as $row) 
  {
      echo '&lt;tr&gt;';
      echo '&lt;td&gt;'. $row['model'] . '&lt;/td&gt;';
      echo '&lt;td&gt;'. $row['problem'] . '&lt;/td&gt;';
      echo '&lt;td&gt;'. $row['work'] . '&lt;/td&gt;';
      echo '&lt;td&gt;'. $row['result'] . '&lt;/td&gt;';
      echo '&lt;td&gt;'. $row['keywords'] . '&lt;/td&gt;';
      echo '&lt;td&gt;'. $row['addedby'] . '&lt;/td&gt;';
      echo '&lt;td&gt;'. $row['date_time'] . '&lt;/td&gt;';
      echo '&lt;td&gt;'. $row['document'] . '&lt;/td&gt;';
  }
  </code></pre>
  
  <p>I allowed users to add documents and the file name is being recorded into documents after string operations.  I want to display respective documents as hyperlinks. If I was using mysql_fetch array I would use</p>
  
  <pre><code>&lt;td&gt;&lt;a href="uploads/&lt;?php echo $row['file'] ?&gt;" target="_blank"&gt; view &lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>but I am not good at PDO and getting synthax error everytime.</p>
  
  <p>here is my erroneous code:</p>
  
  <pre><code>echo '&lt;td&gt;'. &lt;a href="uploads/&lt;?php echo $row['document'] ?&gt;" target="_blank"&gt;view file&lt;/a&gt;.'&lt;/td&gt;';
  </code></pre>