Re: simple, but missing something?
| From: | Rob Adams | Date: | Fri, 26 Mar 2004 22:42:58 +0000 |
| Subject: | Re: simple, but missing something? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181593@lists.php.net to get a copy of this message | ||
"Jas" <jason.gerfen@scl.utah.edu> wrote in message
news:20040326221020.47169.qmail@pb1.pair.com...
> So something like this?
> function database_connection() {
> global = $cfg['hostname'],$cfg['username'],$cfg['password'];
> global = $cfg;
From that page that was linked in the previous post:
<?php
$a = 1;
$b = 2;
function Sum()
{
global $a, $b;
$b = $a + $b;
}
Sum();
echo $b;
?>
Notice a difference between how these two examples declare globals.
-- Rob