Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWesley Dillingham <WWdillingham@sugarlabs.org>2009-08-04 19:39:37 (GMT)
committer Wesley Dillingham <WWdillingham@sugarlabs.org>2009-08-04 19:39:37 (GMT)
commit6f17a6877dac1748691dd1dc8d4e28ea73664d4d (patch)
treea9fd90ea734cae0cf238b6ff134a78dfb9fc1eb4
parenta504e50a1ce559742d92defb5b4e6cd0aa35dc8c (diff)
corrected error
-rw-r--r--4.N.10_Parser.php4
-rw-r--r--order_of_operations_parser.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/4.N.10_Parser.php b/4.N.10_Parser.php
index 88f8253..fd8d2ba 100644
--- a/4.N.10_Parser.php
+++ b/4.N.10_Parser.php
@@ -17,9 +17,9 @@ if(!$fp) die ("Cannot open the file");
$lines = file($fp);
-$numWords = str_word_count($str);
+$numWords = str_word_count($fp);
//Will always be a multiple of four so $NumRecords will be $numWords/4
-$numRecords = $numWords / 4;
+$numRecords = $numWords / 5;
//Our Associative array Will also be in sequence 1,5,9,13.. + 4 etc
//Need to tokenize each line and choose appropriate elements ($1)
//This is just to fill the array with Variables. Next we will go through the same process for the remaining fields
diff --git a/order_of_operations_parser.php b/order_of_operations_parser.php
index 1da881a..d9226d2 100644
--- a/order_of_operations_parser.php
+++ b/order_of_operations_parser.php
@@ -28,7 +28,7 @@ if(!$fp) die ("Cannot open the file");
$lines = file($fp);
-$numWords = str_word_count($str);
+$numWords = str_word_count($fp);
//Will always be a multiple of four so $NumRecords will be $numWords/4
$numRecords = $numWords / 4;
//Our Associative array Will also be in sequence 1,5,9,13.. + 4 etc