<?php 
include("dbConfig.php");
 $sql_vac = "SELECT * FROM hr_add_hodor_ensraf_tbl WHERE vac_stat = 'done_takeed'";
 $result_vac_stat = $conn->query($sql_vac);
 $dates_v = array();
 
 if ($result_vac_stat->num_rows > 0) {
     while ($row_vac_stat = $result_vac_stat->fetch_assoc()) {
         $vac_date_from = $row_vac_stat["vac_date_from"];
         $vac_date_to = $row_vac_stat["vac_date_to"];
         $dateFrom_v = new DateTime($vac_date_from);
         $dateTo_v = new DateTime($vac_date_to);
         
         while ($dateFrom_v <= $dateTo_v) {
             $dates_v[] = $dateFrom_v->format('Y-m-d');
             $dateFrom_v->modify('+1 day');
         }
     }
 }
 
 print_r($dates_v);
?>