Re: Problem in the output of an array
From: Greg Beaver (greg_at_chiaraquartet.net)
Date: 11/30/03
- Next message: Robert Cummings: "Re: [PHP] Problem in the output of an array"
- Previous message: Robert Cummings: "Re: [PHP] Problem in the output of an array"
- In reply to: orlandopozo_at_icnet.com.ve: "Problem in the output of an array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 Nov 2003 19:51:50 -0500 To: orlandopozo@icnet.com.ve
<?php
$array['dim1']['dim2']['dim3'][3] = "value";
$dim1 = 'dim1';
$dim2 = 'dim2';
$dim3 = 'dim3';
$dim4 = 3;
$result = "{$array[$dim1][$dim2][$dim3][$dim4]}";
echo $result;
?>
Regards,
Greg
-- phpDocumentor http://www.phpdoc.org orlandopozo@icnet.com.ve wrote: > I have this code, I would like, if this could be done > > <? > $array['dim1']['dim2']['dim3'][3] = "value"; > > $dim1 = 'dim1'; > $dim2 = 'dim2'; > $dim3 = 'dim3'; > $dim4 = 3; > > $test = "[$dim1][$dim2][$dim3][$dim4]"; > $result = "$array$test"; > > echo $result; > ?> > > The output is : Array[dim1][dim2][dim3][3] > > I need that the output was: value > > Thanks in advanced for any help. >
- Next message: Robert Cummings: "Re: [PHP] Problem in the output of an array"
- Previous message: Robert Cummings: "Re: [PHP] Problem in the output of an array"
- In reply to: orlandopozo_at_icnet.com.ve: "Problem in the output of an array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]