<?php $row = historique::getAll(); if (!empty($row)) { echo json_encode($row); exit(); } else { exit(); }