What is the best practice for closing database connections in PHP when converting from ASP?

When converting from ASP to PHP, it is important to properly close database connections to prevent memory leaks and improve performance. In PHP, the best practice for closing database connections is to use the `mysqli_close()` function after executing all database queries.

// Connect to database
$connection = mysqli_connect("localhost", "username", "password", "database");

// Check connection
if (!$connection) {
    die("Connection failed: " . mysqli_connect_error());
}

// Perform database operations

// Close connection
mysqli_close($connection);