文章目录[隐藏]
数据库中时间由$row[‘olex’]取得。
现在要比较这个变量取得的时间和当前时间的7天前时间大小关系,请问该怎么写呢。
注:数据库中时间字段的值格式为 2014-05-22 17:16:15
回复讨论(解决方案)
echo strtotime($row['olex']) > strtot<strong style="color:transparent">9来源gaodai#ma#com搞@代~码$网</strong>搞gaodaima代码ime('-7 day') ? '7天内' : '很早了';