$line)
$total_lines++;
$decade = $_GET['decade'];
if ($decade == "") {
$decade = '1990';
}
$pub_year = $_GET['pub_year'];
if ($pub_year == "") {
$pub_year = '1990';
}
//print "the selected pub year is: " . $pub_year;
//opening original file
$filename = fopen("mustudent.txt","r");
//reading the file
$m=0;
for ($i = 0; $i < $total_lines; $i++){
($data = fgetcsv($filename, 1000, "\t"));
$total_fields = count($data);
//reading each line (record)
$n=0;
for($j = 0; $j < $total_fields; $j++){
//assigning values to new_array
// print $data[0];
$new_array[$i][$j] = $data[$j];
$temp_year = $data[0];
$just_year = substr($temp_year, 0, 4); // YYYY-MM-DD
if ($just_year == $pub_year) {
// print $just_year . "/" . $just_month . "Date: " . $new_array[$i][0] . "
";
$display_array[$m][$n] = $data[$j];
$n++;
}
}
$m++;
}
fclose ($filename);
//print_r($display_array);
/*
print "
". "
";
print_r($display_array);
print "
". "
";
print_r($new_array);
*/
//printing out TOTAL records in mustudent.txt file
//print "
Browse by and