Re: how insert value inner array
nawfer schreef:
> if this work
> $var0['list'] = array(
> 'type1' => 'val1',
> 'type2' => 'val2',
> 'type3' => 'val3'
> );
The above is valid PHP.
>
> is possible to have this:
> $var0['list'] = array(
> 'type1' => 'val1',
> 'type2' => 'type3' => 'val2-3'
> );
That is invalid.
What do you try to accomplish by that?
What do you expect the following line will produce:
echo $var0['type2'];
???
>
> which is correct code ?
The former.
But as C pointed out, we might be of more help if you describe what you
try to store in that array.
Regards,
Erwin Moller
|