RES: [PHP] Create $var with some function
| From: | Jônatas Zechim | Date: | Thu, 22 Jan 2009 12:52:52 +0000 |
| Subject: | RES: [PHP] Create $var with some function | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-286999@lists.php.net to get a copy of this message | ||
No, that's not the point yet.
-----Mensagem original-----
De: Robert Stankiewicz [mailto:roberts@belfabriek.nl]
Enviada em: quinta-feira, 22 de janeiro de 2009 10:49
Para: Jônatas Zechim; php-general@lists.php.net
Assunto: Re: [PHP] Create $var with some function
> function createvar($var) {
> ${$var} = 'foo';
> global ${$var};
> //or global $$var, i don't know it yet.
> }
>
This should work.