[
[
"1/1/2018 0:00:00",
1044,
6600168
],
[
"1/1/2018 0:02:52",
975,
4388475
],
[
"1/1/2018 0:05:45",
1020,
6865620
]
]
try {
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
$data = $db->query("SELECT * FROM FOO")->fetchAll(PDO::FETCH_ASSOC);
$res = [];
foreach($data as $row) {
array_push($res,[
$row["date"],
$row["colname_1"],
$row["colname_2"],
]);
}
$dbh = null;
var_dump($res);//ваш формат
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
die();
}