|
Posted by Norman Peelman on 01/10/07 01:05
"Geoff Berrow" <blthecat@ckdog.co.uk> wrote in message
news:cqr6q25oh5r97l8j22a5upffcqh7p2vg4q@4ax.com...
> Message-ID: <dfn6q25mhhkts44htptacnu5rmkbcnrq3p@4ax.com> from Onideus
> Mad Hatter contained the following:
>
> >In PHP...how you do you have a variable, array variable?
>
> Funnily enough, I was doing exactly the same thing yesterday. or
> rather, finding out you can't do it. As JO Aho points out, the way to
> go is multidimensional arrays.
>
You can create and use variable array variables easily like so:
${"line_$i"}[$pos] = "some text";
and to make multi-dimensional, just:
${"line_$i"}[$pos] = array('one' => array(), 'two' => array());
and more:
${"line_$i"}[$pos]['one'][0] = array();
etc.
Norm
--
FREE Avatar hosting at www.easyavatar.com
[Back to original message]
|