Re: URGENT Please: global or not?
| From: | Carsten Gehling | Date: | Tue, 19 Dec 2000 22:34:29 +0000 |
| Subject: | Re: URGENT Please: global or not? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31052@lists.php.net to get a copy of this message | ||
From: "[ key5 ]" <key5@key5.com>
Sent: Tuesday, December 19, 2000 6:58 PM
> My functions doesn't work any more since I tried to cope with the problem
by
> assigning a variable $buildTypeTAB the names of the tables that on time to
> time I need to query
>
> function q(){
> return "select * from $buildTypeTAB "
> }
You need to declare $buildTypeTAB as global inside your function:
function q() {
global $buildTypeTAB;
return "select * from $buildTypeTAB ";
}
That should do the trick.
- Carsten *<{:^)>
~~~~~~~~~~~~~~~~