Re: function()
| From: | Rasmus Lerdorf | Date: | Tue, 05 Nov 2002 23:49:05 +0000 |
| Subject: | Re: function() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122890@lists.php.net to get a copy of this message | ||
> Is there a way to make te variables defined in the function 'global' ? So I
> can use them after the function call.
Just make them global inside the function. They don't need to exist in
the global symbol table before the call for this.
try this little test:
<?php
function foo() {
global $a;
$a=1;
}
foo();
echo $a;
?>
-Rasmus