Zdravim.
Nieco robim zle alebo som dobre nepochopil. Chcem jednoducho pridat vysledok s funkcie do array.
Pruser je v tom ze mi to vzdy prida iba jednu hodnotu. Preco?
function only_a_work_day($generated_days){
foreach($generated_days as $row){
$row = explode(' ',$row);
$new_days = array();
foreach($row as $cell){
$day_start = $cell . " 00:00:00.000";
$day_end = $cell . " 23:00:00.000";
$dbc = DbConnectormssql_production();
$query = "SELECT.....'";
$result = sqlsrv_query($dbc, $query);
if($result === false) {
die( print_r( sqlsrv_errors(), true) );
}
$row = sqlsrv_fetch_array($result);
$output = $row ['total'];
if($output>'0'){
array_push($new_days,$cell);
};
}
}