gerkintrigg Posted November 6, 2007 Share Posted November 6, 2007 I'm trying to use this function: http://www.go4expert.com/forums/showthread.php?t=456 It seems to work fine, but i'm wondering what kind of integer needs to go into it? I'm trying this code and the number that's output seems to be far too long (time-wise). include $root.'includes/functions/time_remaining.php'; $now=time(); $timeleft=time_left(strtotime($r['reg_date'])-strtotime($now)); echo $timeleft; Could anyone help me please? Thanks. Quote Link to comment Share on other sites More sharing options...
worldofcarp Posted November 20, 2007 Share Posted November 20, 2007 That function takes seconds as an input. I think the strtotime($now) where $now=time() might be the problem -- time() returns a timestamp as an integer, strtotime() takes a string representation of a time and automagically converts it into a timestamp. If you pass time() to strtotime() I'm not sure what it will do. Just use time() instead of strtotime(time()). This page has some good documentation on what strtotime does Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.