On Thu, 17 Jan 2002 11:11:43 -0500, you 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++;
>}
What about
$i = 0; // set the start (or use for())
while ($i<$loopcounter) {
> $temp = "size". $i; // $temp = 'size1', 'size2'...
$valueofsize = $$temp;
$i++; # untested code, should be OK though
}
No messing around with evals neccessary.
Alister
--
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]