Math Operator Problem?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial!
http://www.windowsonecare.com/purchase/trial.aspx?sc_cid=wl_wlmail

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux