PHP functions for MySql : mysqli_close()

The mysqli_close() function is used to close MySQL connection. It returns true on success or false on failure. The Syntax is :
mysqli_close( $connection_identifier );
Example :
<?php

  $server = "localhost";
  $username = "username";
  $password = "";

  $connection = mysqli_connect($server, $username, $password);

  if(!$connection) {
    die("Connection failed: " . mysqli_connect_error());
  } else {
    echo "Successfully connected to MySQL database.";
  }

  mysqli_close($connection);

?>

Next Topic :