On Mon, 2009-02-09 at 07:32 -0500, Alice Wei wrote: > Hi, > > I have a snippet of code as follows: > > while (!feof($fh2)) { > > $total_time=0; > $lines= fgets($fh2); > $count= strlen($lines); > if ($count == 0) { > //There are no lines > } > else { > > $total_time += $lines; > > } > } > > What I am trying to do here is to increment the total_time value and > have it display on the screen without changing the actual input file. > However, when I tried to output the result on the screen, all I am > getting is the same value as I have in the text file originally. Can > anyone on the list please give me some insight on what I am doing > wrong here? > Thanks in advance. > > > Alice > Alice, It might help if you posted a couple of lines from the $fh2 file. Are any of the lines in it empty? Thanks, James -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php