> <?
> $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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to