On 3/8/07, Otto Wyss <[EMAIL PROTECTED]> wrote:
Satyam wrote: > > $key = 'K' . $key; > if ($$key) { > > notice double dollar sign, it means, not the value of $key but the value of > the variable $key says. > Thanks, any idea where this is described in the PHP manual? Searching for "$$" produces no results. O. Wyss
This code fragment will produce a variable such as $yellow_7, for example, where $aNumber is equal to 7. Then use it as any other variable. ${'yellow_' . $aNumber} = "assign something"; I've posted this example before, however, and the general consensus seems to be to just use an array. David