Thanks olaf, with your help I was able to get my desired results.
I removed the code below. (which is actually needed eslewhere)
$f_size = filesize($file);
$f_handle = fopen($file, "r");
$f_data = fread($f_handle, $f_size);
$file_name[$num]=$file;
And place it within a different IF statement:
<?php
$path="c:/Program Files/Apache Group/Apache/htdocs/biz_dir";
$dhandle=opendir($path);
$num=1;
while ($file = readdir($dhandle))
{ if (($file!=".") && ($file!="..") && (!is_dir($file))) //Check for regular file
{
$file_ext = substr($file, strlen($file)-3, 3);
}
if ($file_ext == "htm")
{
$f_size = filesize($file);
$f_handle = fopen($file, "r");
$f_data = fread($f_handle, $f_size);
$file_name[$num]=$file;
echo $num;
echo $file_name[$num].' ';
$num++;
}
}
echo 'THE END ';
?>