I bring the fields of a table via JSON, they are printed perfectly as <td>{{data.Vence}}</td>
. My problem is that I want to compare this date with today + 30 to see if it is lower and declare an alarm, but I could not do it since I can not access this date {{data.Vence}}
.
<?php
$t = strtotime('+30 days');
$f = '{{data.Vence}}';
echo $f; (ESTO FUNCIONA BIEN, hasta aquí)
/*if (strtotime($f) < strtotime($t)) {
echo "Rojo";
}else {
echo "Verde";
}
*/
?>