PHP mysqli_close() Function
Definition
The mysqli_close() function closes a previously opened database connection.
Syntax
PHP mysqli_close() Function has the following syntax.
mysqli_close(connection);
Parameter
Parameter | Is Required | Description |
---|---|---|
connection | Required. | MySQL connection |
Return
It returns TRUE on success or FALSE on failure.
Example
The following code closes a previously opened database connection.
<?php/*from w ww . jav a 2 s . com*/
$con=mysqli_connect("localhost","my_user","my_password","my_db");
mysqli_close($con);
?>