php database connection?
<p>i have a few question on php db connection and hoping someone can answer them all, when i create a db connection using pdo, like below</p>

<pre><code>&lt;?php
/* Connect to an ODBC database using driver invocation */
$dsn = 'mysql:dbname=testdb;host=127.0.0.1';
$user = 'dbuser';
$password = 'dbpass';

try {
    $dbh = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
    echo 'Connection failed: ' . $e-&gt;getMessage();
}

?&gt;
</code></pre>

<ol>
<li>is this connection always created when someone refreshes the php page? </li>
<li>or does it check if that connection is already open and then use that connection instead?</li>
<li>how would i be able to close that connection when i am done with it?</li>
</ol>
