Re: [PHP] Regarding variable reference

2004-06-16 Thread Curt Zirzow
* Thus wrote Ulrik S. Kofod ([EMAIL PROTECTED]): > but I think it is easier to read the program when using eval as it is more eye > catching than just an extra $ that is easily missed. If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus Lerdorf, BDFL of PHP Cu

Re: [PHP] Regarding variable reference

2004-06-16 Thread Justin Patrin
Ulrik S. Kofod wrote: Justin Patrin sagde: Ulrik S. Kofod wrote: Why are you using eval? Eval is slow and is a hack... Just do: $y = $$x; if(isset($y)) { echo "$x:$y"; } } True ! I just tested it with both eval and $$, and $$ seems to be about 3 to 4 times fas

Re: [PHP] Regarding variable reference

2004-06-16 Thread Jason Wong
On Tuesday 15 June 2004 14:14, [EMAIL PROTECTED] wrote: > Hi, > I have variables called Cookie1 to Cookie35. > > I would like to print the values of Cookie1 to Cookie35 using for loop. > > Could anybody correct the below code to print the variables. > > == > for($i=1;$i

Re: [PHP] Regarding variable reference

2004-06-15 Thread Ulrik S. Kofod
Justin Patrin sagde: > Ulrik S. Kofod wrote: > > Why are you using eval? Eval is slow and is a hack... Just do: > $y = $$x; > >> if(isset($y)) >> { >> echo "$x:$y"; >> } >> } > True ! I just tested it with both eval and $$, and $$ seems to be about 3 to 4 t

Re: [PHP] Regarding variable reference

2004-06-15 Thread Justin Patrin
Ulrik S. Kofod wrote: [EMAIL PROTECTED] sagde: Hi, I have variables called Cookie1 to Cookie35. I would like to print the values of Cookie1 to Cookie35 using for loop. Could anybody correct the below code to print the variables. =for($i=1;$i<34;$i++) { $x="Cooki

RE: [PHP] Regarding variable reference

2004-06-15 Thread Ford, Mike [LSS]
On 15 June 2004 08:25, Ulrik S. Kofod wrote: > [EMAIL PROTECTED] sagde: > > > > Hi, > > I have variables called Cookie1 to Cookie35. > > > > I would like to print the values of Cookie1 to Cookie35 using for > > loop. > > > > Could anybody correct the below code to print the variables. > > >

Re: [PHP] Regarding variable reference

2004-06-15 Thread Marek Kilimajer
[EMAIL PROTECTED] wrote --- napi'sal:: Hi, I have variables called Cookie1 to Cookie35. I would like to print the values of Cookie1 to Cookie35 using for loop. Could anybody correct the below code to print the variables. == for($i=1;$i<34;$i++) { $x="Cookie".$i;

Re: [PHP] Regarding variable reference

2004-06-15 Thread Ulrik S. Kofod
[EMAIL PROTECTED] sagde: > > Hi, > I have variables called Cookie1 to Cookie35. > > I would like to print the values of Cookie1 to Cookie35 using for loop. > > Could anybody correct the below code to print the variables. > > =for($i=1;$i<34;$i++) > { > $x="Cookie