Re: simple arithmetic problem

From: Date: Sun, 16 Mar 2003 17:00:51 +0000
Subject: Re: simple arithmetic problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139850@lists.php.net to get a copy of this message
fgets moves the position in the file pointer, you need echo (time()).">><br>"; $old=fgets($fp); echo $old." = <br>"; $new=time(); echo ">>>".($new - $old)."<<<<br>"; pei_world wrote:
I have a problem in time substraction. the number print out correct, but don't know why i cann't do the substraction between them ======================================= echo (time()).">><br>"; echo (fgets($fp))." = <br>"; $new=time(); $old=fgets($fp); echo ">>>".($new - $old)."<<<<br>"; ouput ====================================== 1047832384>> 1047832349 =
1047832384<<<
       
-- Sincerely your; pei_world ( .::IT::. )


« previous php.general (#139850) next »