$query = "SELECT * FROM credit;";
$result = $mysqli->query($query);
$clients = [];
while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
$clients[] = $row;
}
Call to a member function fetch_array() on boolean
while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
bool(false)