ok I have a php code through a form that I want to look a little differently....here is the final output
Monday Tuesday
WhereArtThou: 0 WhereArtThou: 1
BlackBart: 1 BlackBart: 1
Jonesey: 0 Jonesey: 0
Now I want the table to look something like this
Monday Tuesday
WhereArtThou: 0 1
BlackBart: 1 1
Jonesey: 0 0
Here is my php code right now
<?php
$monday = $_POST['monday'];
$tuesday = $_POST['tuesday'];
function Chk_File($filename) {
$fp = fopen($filename,"r") or die("Failed!");
$end_report = fread($fp, filesize($filename));
$names['WhereArtThou'] = 0;
$names['BlackBart'] = 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";
if ($value >= '1') echo "1";
else echo "0";
echo '<br />';
}
fclose($fp);
}
echo '<center><b>These are the results for the files you specified.</b></center>';
echo "<TABLE>\n";
echo '<th>Monday</th>';
echo '<th>Tuesday</th>';
echo " <TR>\n";
$filename = array($monday,$tuesday);
for($i = 0; $i < count($filename); $i++) {
echo " <TD>";
Chk_File($filename[$i]);
echo " </TD>";
}
echo " </TR>\n";
echo "</TABLE>\n";
?>
Thanks up front for any help....