fetch_assoc(); // Remember the records $returnData[] = $record["id"]; $returnData[] = $record["name"]; $returnData[] = $date; mysqli_free_result($recordSet); echo(json_encode($returnData)); // Close the connection to the database db_close($database); } catch(Exception $e) { $errorMsg = $e->getMessage(); print_r($errorMsg); } ?>