Re: [PHP] Re: Problem in the output of an array

2003-11-29 Thread Robert Cummings
On Sat, 2003-11-29 at 21:25, john wrote: > > $result = eval( 'return $array'.$test.';' ); > > Um... > > echo $array[$dim1][$dim2][$dim3][$dim4]; > > eval == evil. I can't think of a single legimiate reason why you'd want/need Eval is not evil, but it is often insecurely used. It has it's pur

[PHP] Re: Problem in the output of an array

2003-11-29 Thread john
$result = eval( 'return $array'.$test.';' ); Um... echo $array[$dim1][$dim2][$dim3][$dim4]; eval == evil. I can't think of a single legimiate reason why you'd want/need to make a string "[$dim1]" first, and if you have to I'd suspect that something is very wrong with the way you are writi

[PHP] Re: Problem in the output of an array

2003-11-29 Thread Greg Beaver
$dim1 = 'dim1'; $dim2 = 'dim2'; $dim3 = 'dim3'; $dim4 = 3; $result = "{$array[$dim1][$dim2][$dim3][$dim4]}"; echo $result; ?> Regards, Greg -- phpDocumentor http://www.phpdoc.org [EMAIL PROTECTED] wrote: I have this code, I would like, if this could be done $dim1 = 'dim1'; $dim2 = 'dim2'; $dim3