On Tue, 17 Jun 2003, Antti wrote:

> Ho can I create (name) a variable with other variables value?
> If $foo = "bar";
> then the variable I want to create is $bar.
> How do I do this?

<?php

$foo = 'bar';
$$foo = 'barvalue';
print $bar;

?>

        This prints "barvalue".

-- 
Mika Tuupola                      http://www.appelsiini.net/~tuupola/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to