Re: [PHP] generating variable names

2002-09-08 Thread timo stamm
Hi Kevin, I find it a bit awkward to mix variables and arrays in a pseudo array. But I guess you have reasons... Anyhow, maybe this is what you want: $variable1="one"; $variable2="two"; $variable3 = array(); $variable3[0]="three"; $variable4 = array(); $variable4[0]="four"; $j=1; wh

RE: [PHP] generating variable names

2002-09-06 Thread Daniel Masson
Hi ... You can make it like this: If you have $variable4[0]="four"; Then you can have a new variable $$variable[0] , and the new variable´s name is four Cordialmente Daniel Massón => Ingeniero de desarollo [EMAIL PROTECTED] www.imagine.com.co Tels: (57)(1) 2182064 - 6163218 Bogotá - Col

Re: [PHP] Generating variable names 'on the fly'

2001-09-21 Thread Marcus Rasmussen
You can allso do like this: $i = 1; ${"test". $i} = "123"; echo $test1; ___ Marcus Rasmussen [EMAIL PROTECTED] On 21-09-01 at 11:21 _lallous wrote: >you can always use eval to create a variable too! > >$i = 1; >eval("\$test$i=123;"); >echo $test1; >?> > >