<?php
include("dbConfig.php");

$year = date("Y");
$month = date("m");
$count = 0;
$ar = array();

$sql_q = "SELECT * FROM hr_add_hodor_ensraf_tbl WHERE employee_number_fingerprint='3' AND YEAR(hodor_ensraf_date)='$year' AND MONTH(hodor_ensraf_date)='$month'  AND stop='0' AND deleted='0'";
$result_q = $conn->query($sql_q);

if ($result_q->num_rows > 0) {
    while ($row_q = $result_q->fetch_assoc()) {
        if (($row_q["hodor_time"] == $row_q["ensraf_time"] || $row_q["hodor_time"] == "00:00:00" || $row_q["ensraf_time"] == "00:00:00") && $row_q["hodor_ensraf_stat"] == "0") {
            $count++;
            $ar[] = $row_q["hodor_ensraf_date"]; 
        }
    }
}

echo $count . "</br>";
print_r($ar);

for ($i = 0; $i < count($ar); $i++) {
    echo $i;
    if ($i <= 1) { 
        echo $ar[$i] . "/" . "warning" . "</br>";
    } else {
        echo $ar[$i] . "/" . "cut" . "</br>";
    }
}
?>