<?php
include "ChatConfig.php";
include_once "jdf.php";
$stmt = $connection->query("SELECT last_seen from users");
$result = $stmt->fetchAll(PDO::FETCH_OBJ);
$ids = array_map(function($v){
    return $v->last_seen;
}, $result);

echo json_encode($ids);