Re: [PHP-DB] Using a variable as a variable name

2002-09-04 Thread Pierre-Alain Joye
hello, You can find syntax description in the documentation (variable variables section) $myvar1 = "MYVAR1 CONTENT"; $myvar2 = "MYVAR2 CONTENT"; $i = 0; $myvar = 'myvar'.++$i; echo "\n"; echo $$myvar; echo "\n"; $myvar = 'myvar'.++$i; echo "\n"; echo $$myvar; echo "\n"; can do it hth pa

[PHP-DB] Using a variable as a variable name

2002-09-04 Thread Stephen Rhodes
Hi I am wanting to use the value in a variable as a variable name. I know it is possible but do not remember how to do it - what function to call. Example $section1 = "SECTION 1"; $section2 = "SECTION 2"; // I want to have a for loop that will call these variables. eg for ($i=1;$i<3;$