<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json", "utf8");
setlocale(LC_ALL, 'ru_RU.CP1251');
$connect = mysqli_connect ($db_host, $db_user, $db_pass, $db_name);
$data = array();
$ta = mysqli_query($connect, "SELECT * FROM blabla");
while($row = mysqli_fetch_assoc($ta)){
$date = strftime('%d %b %Y', strtotime($row['date']));
$data[] = $row;
}
echo $date;
echo json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
$ta = mysqli_query($connect, "SELECT * FROM blabla");
while($row = mysqli_fetch_assoc($ta)){
$row['date'] = strftime('%d %b %Y', strtotime($row['date']));
$data[] = $row;
}