Parse error: syntax error, unexpected '{' in 
<p>This is my current code:</p>

<pre><code>$directory = "polls/";
$dir = opendir($directory);

while (($file = readdir($dir)) !== false {

  $filename = $directory . $file;
  $type = filetype($filename);
  if ($type == 'file') {
     $contents = file_get_contents($filename);
     $items = explode('¬', $contents);
     echo '&lt;table width="500" border="1" cellpadding="4"&gt;';
     foreach ($items as $item) {
       echo "&lt;tr&gt;&lt;td&gt;$item&lt;/td&gt;&lt;/tr&gt;\n";
     }
     echo '&lt;/table&gt;';
  }
}
closedir($dir);
</code></pre>

<p>For some reason this line is giving me an error:</p>

<pre><code>while (($file = readdir($dir)) !== false {

Parse error: syntax error, unexpected '{' in
</code></pre>
