title: Creating a table in PHP within current function
body: <p>I am really struggling with some PHP. I have Googled and asked everyone I know before troubling you fine people!</p>
  
  <p>I have cribbed together the below to display the latest 20 files as links from a folder. </p>
  
  <p>The only problem I have is the output is a single string. I really want to put it in a table.</p>
  
  <p>Each time I try it just dumps everything in each field, so I guess there is some clever looping that I need!</p>
  
  <p>Any ideas? Here is my code:</p>
  
  <pre><code>&lt;?php
  $dir = "./PDF";
  chdir($dir );
  $show = 20;
  
  $files = glob( '*.{pdf}', GLOB_BRACE );
  usort( $files, create_function('$b, $a', 'return filemtime( $a ) - filemtime( $b );') );
  
  for ( $i = 0; $i &lt; $show; ++$i )
  echo '&lt;a href="./PDF/', $file = $files[$i], '" target="_blank"&gt;', $file, '&lt;/a&gt; - ', date( 'D, M d, Y', filemtime($file) ), ' - ',filesize($file),'kb;&lt;br /&gt;&lt;br/&gt;', "\n";
  ?&gt; 
  </code></pre>