$ac = shell_exec("sqlite3 /projects/history_data/data.sqlite 'select * from value '"); $lines = explode(PHP_EOL, $ac); echo json_encode($lines);