**php program for reading filenames and filetypes from a dir.**
it shows the syntax error : Parse error: syntax error, unexpected 'filename' (T_STRING) in C:\xampp\htdocs\php\dir.php on line 9
<?php
$dir="C:\xampp\htdocs\php\";
if(is_dir($dir))
{
if($dirref=opendir($dir))
{
while(($file=readdir($dirref))!==false)
{
echo "filename : $file : filetype: ".filetype($dir.$file)."
";
}
closedir($dirref);
}
}
?>