Create $var with some function
- From: zechim.php@xxxxxxxxx (Jônatas Zechim)
- Date: Thu, 22 Jan 2009 10:45:18 -0200
Hi there,
Someone know if can (if possible, how) i create a $var on my script like this:
function createvar($var) {
$var = 'foo';
global $var;
//or global $$var, i don't know it yet.
}
so i'd call,
createvar('myvar');
so i'd could call $myvar, like this:
echo $myvar; // prints 'foo'
is it possible?
.
- Follow-Ups:
- Re: [PHP] Create $var with some function
- From: Richard Heyes
- Re: [PHP] Create $var with some function
- From: Robert Stankiewicz
- Re: [PHP] Create $var with some function
- References:
- How to use SVN + PHP
- From: Edmund Hertle
- Re: How to use SVN + PHP
- From: Ross McKay
- Re: [PHP] Re: How to use SVN + PHP
- From: derby
- Re: [PHP] Re: How to use SVN + PHP
- From: Nathan Rixham
- How to use SVN + PHP
- Prev by Date: Re: [PHP] About printing functions
- Next by Date: Re: [PHP] Create $var with some function
- Previous by thread: Re: [PHP] Re: How to use SVN + PHP
- Next by thread: Re: [PHP] Create $var with some function
- Index(es):
Relevant Pages
|