vicodin Posted November 29, 2008 Share Posted November 29, 2008 Hello all i am trying to compare dates and find out if the person signed up this month or before this month. So i came up with this and it works but was wondering if there was a better way to do it. $signup = "2008-10-09";//<-- What ever date is pulled from DB $date = date("Y/m"); $date.= "/01"; $date = strtotime($date); $signup = strtotime($signup); if ($signup > $date){ echo 'Signed Up This Month'; } else { echo ' Signed Up Before'; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.