I am trying to code the following: $expires = current date + 7 days and if current date > $expires echo('expired'); can anyone help?
$now = time(); // current unix timestamp $day = 3600 * 24; //numbers of seconds per day $expires = $now + 7*$day; PHP: $now = time(); // current unix timestamp if($now > $expires) echo ('expired'); PHP:
$time = time(); //current time stamp echo strftime ("%D", $time); PHP: To know what the %D means, and other possibilities you have, you must read this page http://www.php.net/strftime