0
I searched right here and found a solution to compare dates, but for me it is not working to strtotime
$dataVencimento = date("d/m/Y", strtotime($dados->VENCIMENTO));
$dataAtual = date("d/m/Y");
echo $dataAtual;
if(strtotime($dataVencimento) < strtotime($dataAtual))
{
$situacao = "<span class='label label-danger'>VENCIDO</span>";
}
The value of dataVencimento
is 15/09/2018 and the dataAtual
is 18/09/2018, therefore it is smaller and should enter the if
, but does not enter.
believe q this link can help you https://stackoverflow.com/questions/8722806/how-to-compartwo-dates-in-php
– sant0will