Re: [PHP] Combining two variables...

2004-08-04 Thread John Nichel
On Wednesday 04 August 2004 11:50, [EMAIL PROTECTED] offered up the following tid-bit of information : > I'm trying to create a links page, and I wanna filter by category. > Anyhoo, > What I need to do, is have one block of code that I repeat ad neaseum, > based on each category, so if I adda new

Re: [PHP] Combining two variables...

2004-08-04 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED]: > I'm trying to create a links page, and I wanna filter by category. > Anyhoo, > What I need to do, is have one block of code that I repeat ad neaseum, based on each > category, so if I adda new category, I don't need to add new code... > > All good so far. > So

Re: [PHP] combining two variables to make one???

2003-12-22 Thread Tristan . Pretty
I am a monkey... I had me angle bracket the wrong way round... what a stoner...! "Chris Boget" <[EMAIL PROTECTED]> 22/12/2003 15:04 To <[EMAIL PROTECTED]> cc <[EMAIL PROTECTED]> Subject Re: [PHP] combining two variables to make one??? > Doesn't

Re: [PHP] combining two variables to make one???

2003-12-22 Thread Chris Boget
> Doesn't work for me though...? Which isn't working? This: ${"$options{$i}"} = "result $i"; or this: $i = 1; while ($i >= 3) { $varName = $options . $i; ${$varName} = "result $i"; } > What do the '{' mean when declaring the variable? I can't remember where it is in the documentati

Re: [PHP] combining two variables to make one???

2003-12-22 Thread Tristan . Pretty
Cheers... Doesn't work for me though...? What do the '{' mean when declaring the variable? "Chris Boget" <[EMAIL PROTECTED]> 22/12/2003 14:16 To <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> cc Subject Re: [PHP] combining two variables to ma

Re: [PHP] combining two variables to make one???

2003-12-22 Thread Chris Boget
> $i = 1; > while ($i >= 3) { > $options$i = "result $i"; > } > ?> You want this: ${"$options{$i}"} = "result $i"; For the sake of clarity I typically do something like the following: $i = 1; while ($i >= 3) { $varName = $options . $i; ${$varName} = "result $i"; } Chris -- PHP Genera