shane18 Posted February 7, 2010 Share Posted February 7, 2010 if($STATUS_CHECK4->last_activity >= time() + 3600){ This works, but is it bad programming to do stuff like time() + 3600 in a if statement... instead of doing $TIME = time() + 3600; and then just putting $time? Link to comment https://forums.phpfreaks.com/topic/191253-if-statement/ Share on other sites More sharing options...
ShadowIce Posted February 7, 2010 Share Posted February 7, 2010 if($STATUS_CHECK4->last_activity >= time() + 3600){ should be $thetime = (time() + 3600); if($STATUS_CHECK4->last_activity >= $thetime){ Link to comment https://forums.phpfreaks.com/topic/191253-if-statement/#findComment-1008390 Share on other sites More sharing options...
shane18 Posted February 7, 2010 Author Share Posted February 7, 2010 So even though my way worked, its better practice to do it your way? Link to comment https://forums.phpfreaks.com/topic/191253-if-statement/#findComment-1008391 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.