I tried that....heres what I tried to do....or how I modified your code
<?php
function Chk_File($file) {
$fp = fopen($file,"r") or die("Failed!");
$end_report = fread($fp, filesize($filename));
//more names then this but just an example
$names['Silver Sniper'] = 0;
$names['Timmietie'] = 0;
$names['Hoot'] = 0;
$names['Jonesey'] = 0;
foreach(array_keys($names) as $value){
$names[$value] = substr_count($end_report, $value);
}
foreach($names as $key=>$value) {
echo "$key: $names[$key] <br />\n";
}
fclose($fp);
}
echo "<TABLE>\n";
echo " <TR>\n";
$filename = array('CI Dec102002.txt','CI Dec112002.txt','CI Dec122002.txt');/*i would like to be able to put a form so that I do not have to manually put this in everytime I need to change the gfilenames*/
for($i = 0; $i < count($filename); $i++) {
echo " <TD>";
$Chk_File($filename[$i]);
echo " </TD>";
}
echo " </TR>\n";
echo "</TABLE>\n";
?>
but it gives me an error at this point
$Chk_File($filename[$i]);
Fatal error: Call to undefined function: () in c:\public_html\endofday\endofdayarray4.php on line 76
maybe im still too new at this or not doing it right at all...