"); // tell browser table to be produced $totalCost = 0.00; while (list($id,$name,$cost)=fgetcsv($filePointer)) { $totalCost += $cost; // accumulate cost total //$totalValue += $cost * quantity; // print detail line as table row and data cells print ("$id$name$cost"); } // print footing line print("Total Cost:$totalCost"); print(""); // send table end tag fclose($filePointer); ?>