vhg119
03-28-2005, 04:01 PM
I can accross this bit of code from the pear documentation.
<?php
require_once 'DB.php';
$dsn = 'pgsql://someuser:apasswd@localhost/thedb';
$options = array(
'debug' => 2,
'portability' => DB_PORTABILITY_ALL,
);
$db =& DB::connect($dsn, $options);
if (PEAR::isError($db)) {
die($db->getMessage());
}
// ...
$db->disconnect();
?>
what does the =& assignment opperator do?
<?php
require_once 'DB.php';
$dsn = 'pgsql://someuser:apasswd@localhost/thedb';
$options = array(
'debug' => 2,
'portability' => DB_PORTABILITY_ALL,
);
$db =& DB::connect($dsn, $options);
if (PEAR::isError($db)) {
die($db->getMessage());
}
// ...
$db->disconnect();
?>
what does the =& assignment opperator do?