Given a datetime string like this:
2012-06-19 03:44:39
I want to use it to provide a countdown (in minutes) until that time.
You can post again in <?php echo date('i', strtotime($expires) - strtotime(time())) ?> minutes.
That’s what I have, but it always says 15 minutes. Probably because time() isn’t the right function to use but I’m not sure.
Thanks.
time()already returns a timestamp so you don’t have to usestrtotimeon it: