Re: [PHP] simple arithmetic problem

2003-03-16 Thread Marek Kilimajer
fgets moves the position in the file pointer, you need echo (time()).">>"; $old=fgets($fp); echo $old." = "; $new=time(); echo ">>>".($new - $old)."<<<"; 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

[PHP] simple arithmetic problem

2003-03-16 Thread pei_world
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()).">>"; echo (fgets($fp))." = "; $new=time(); $old=fgets($fp); echo ">>>".($new - $old)."<<<";