Parse error: syntax error, unexpected '{' in

iluvu

New Member
This is my current code:\[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 '<table width="500" border="1" cellpadding="4">'; foreach ($items as $item) { echo "<tr><td>$item</td></tr>\n"; } echo '</table>'; }}closedir($dir);\[/code\]For some reason this line is giving me an error:\[code\]while (($file = readdir($dir)) !== false {Parse error: syntax error, unexpected '{' in\[/code\]
 
Back
Top