Re: Creating a varable with a name held in a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ben,

Friday, February 11, 2005, 12:36:16 AM, you wrote:

BEl> So the question is is there a function like create_var which
BEl> takes a string and a value and creates a variable?

$var_name = "new_variable";
$$var_name = "hello world";
echo $new_variable;

Search for "variable variables" in the PHP manual for more info.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux