I got this code from Stackoverflow and changed it slightly to work with today's date.
I want to check if today fits between two dates. But this is not working.
What am I missing?
$paymentDate = date('d/m/Y');
echo $paymentDate; // echos today!
$contractDateBegin = date('d/m/Y', '01/01/2001');
$contractDateEnd = date('d/m/Y', '01/01/2015');
if ($paymentDate > $contractDateBegin && $paymentDate < $contractDateEnd)
{
echo "is between";
}
else
{
echo "NO GO!";
}
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…