';
-?>
-query("SELECT * FROM table LIMIT 10");
-//test if connection failed
-if(mysqli_connect_errno()){
- die("connection failed: "
- . mysqli_connect_error()
- . " (" . mysqli_connect_errno()
- . ")");
+// Get the result in to a more usable format.
+$query = array();
+while($query[] = mysqli_fetch_assoc($result));
+array_pop($query);
+
+// Output a dynamic table of the results with column headings.
+echo '
';
+echo '
';
+foreach($query[0] as $key => $value) {
+ echo '
';
+ echo $key;
+ echo '
';
}
-
-//get results from database
-$result = mysqli_query($connection,"SELECT * FROM users");
-$all_property = array(); //declare an array for saving property
-
-//showing property
-echo '