-14 Days Ago

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to see whether a data in an array pulled from a MySQL DB (YEARMONTHDATE) is older than 14 days ago. I am trying to do this in PHP. My code looks like:

if($array['due'] <= $today - 14)
{
echo "<h5>Assignment In Void:</h5><br><h4>Assignments in the void are read-only";
require('footer.php');
exit;
}.


I am having problems with the math. How do I do a date subtraction without ending up with something like 20040994 (not a valid date)?

Thanks,
Cole

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux