Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/4.N.10_Parser.php
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 /4.N.10_Parser.php
parenta504e50a1ce559742d92defb5b4e6cd0aa35dc8c (diff)
corrected error
Diffstat (limited to '4.N.10_Parser.php')
-rw-r--r--4.N.10_Parser.php4
1 files changed, 2 insertions, 2 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