$valueofsize = ${"size" . $i};
or $var = "size" . $i; $valueofsize = $$var; bvr. On Thu, 17 Jan 2002 11:11:43 -0500, Mike Krisher wrote: >I can not wrap my head around variable variables today, not awake yet or >something. > >For instance I trying something like this: > >while ($i<$loopcounter) { > $temp = "size"; > $valueofsize = $$temp$i; > $i++; >} > >this doesn't work obviously, $valueofsize ends up with a literal value of >"$size1". But I need it to equal the value of a variable named $size1. Do I >need to use a eval() or something? > >Thanks in advance, >¯ Michael Krisher > [EMAIL PROTECTED] > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]