0

Currently I'm storing timestamps in the database like such 1378852898

How can I check this against the current time() to see if it's within the last 10mins with PHP?

Curtis
  • 2,646
  • 6
  • 29
  • 53

1 Answers1

0

if (time() - $timestampvar < 10 * 60) { ... }.

collapsar
  • 17,010
  • 4
  • 35
  • 61
  • trying to earn points – vladkras Sep 11 '13 at 17:10
  • @vladkras: wrong guess. i submitted the answer before it was marked as duplicate. i am not aware that researching possible duplicates on SO is considered part of this site's etiquette. – collapsar Sep 11 '13 at 19:06