Код: Выделить всё
date_default_timezone_set('Asia/Jakarta');
$u = $row->jadwalkal; *//from database*
$tgl1 = $u;
$tgl2 = date("Y-m-d");
$selisih = strtotime($tgl1) - strtotime($tgl2);
$hari = $selisih / (60 * 60 * 24);
if ($hari < 0) {
?>
Подробнее здесь: [url]https://stackoverflow.com/questions/32006130/how-count-result-php-from-if[/url]