i am trying to pull the info from my txt. file and get my php to process it so it shows up when i run the web page. The web page should display the name and how many copies altogether from the txt. file there are. i have been trying all day to finish this assignment for school, any help would be greatly appreciated.
html
Software1SOFTWARE ORDERS: REPORT
php
<?php $multipleOrders = 0; $linuxCopies = 0; $macintoshCopies = 0; $windowsCopies = 0; $orderFile = fopen("ordersBoles.txt", "r"); $nextOrder = fgets ($orderFile); while (!feof($orderFile)) { list($os,$copies) = split (":", $nextOrder); { if ($os == "Linux") { $linuxCopies = $copies + 1; } if ($os == "Macintosh") { $macintoshCopies = $copies + 1; } if ($os == "Windows" ) { $windowsCopies = $copies + 1; } if ($os == "Multiple") { $multipleCopies = $copies + 1; } } $nextOrder = fgets ($orderFile); } fclose($orderFile); print ("SOFTWARE ORDERS: REPORT
"); print ("ORDERS FOR MULTIPLE COPIES: $multipleOrders
"); print ("LINUX COPIES ORDERED: $linuxCopies
"); print ("MACINTOSH COPIES ORDERED: $macintoshCopies
"); print ("WINDOWS COPIES ORDERED: $windowsCopies
"); ?>txt. file
1 Linux:1
2 Macintosh:1
3 Windows:1
4 Macintosh:1
5 Macintosh:2
6 Linux:5
7 Macintosh:10
8 Windows:10
9 Macintosh:1
10 Windows:1
11 Windows:1
12 Linux:1
13 Macintosh:5
14 Linux:4
15 Windows:1
16 Macintosh:1
17 Windows:1
18 Linux:2
19 Macintosh:2
20 Windows:1
21