Hi guys, i'm new to PHp and am having trouble with one of my codes :
<?php
if ($filelist = glob('*.html')) {
header('Location: '.$filelist[rand(0, count($filelist) - 1)];
}
else {
print 'Error: No HTML files in the directory';
}
?>
The code is supposed to display a random .html page from the same direcotry as this PHP script but is diplaying a PARSE ERROR on Line 3.
Can anyone tell me where it's all gone wrong ?