0) { // if there is any record, display all records echo "

There are $num records

"; // print out all records while ($row = mysqli_fetch_array ($result, MYSQLI_ASSOC) ) { echo "

Title: $row[title]
"; echo "Comment: $row [comment]
"; echo "URL: $row[url]

} else { // if there is no record, print out the following message echo "

There is no record

"; mysqli_close ($dbc) ; // close the DB connection ?>