我正在尝试写一个if语句检查是否在过去三天内更新了artical,以便我可以使用它.我发现如何做到这一点我有点麻烦.我阅读的文章越多,它就越偏离我需要的东西.
到目前为止,我一直在努力解决这个问题,它似乎还拉回了那一刻之前发布的所有内容.一些帮助将不胜感激!
if( strtotime($row->update_date) < strtotime('now')){
print('true');
}?>
Run Code Online (Sandbox Code Playgroud)
这应该会让你到那里
if( strtotime($row->update_date) > strtotime('-3 days')){
print('true');
}
Run Code Online (Sandbox Code Playgroud)