This question already has an answer here:
- Date comparison in PHP 2 answers
I have a string and want to convert it into a date and then perform some compare and do some action. This is my scenario:
$a="2015-02-17" //yyyy-mm-dd
$b="2015-01-17" //yyyy-mm-dd
if ($a>$b)
{
//action1
}
else
{
//action2
}
</div>