Posted by Silvio Porcellana on 09/27/05 21:03
Scott Fletcher wrote:
>What I want this to work instead is
>[code]
> $array = array();
>
> $array['col1']['col2'] = "Test #1";
> $array['col3']['col2'] = "Test #2";
>
> $prefix = "['col3']['col2']";
>
> echo $array.$prefix; //Spitted out result as "Test #2"...
>[/code]
>
>
Try something like this:
<code>
$var = "\$array".$prefix;
eval("echo $var;");
</code>
HTH, cheers
Silvio
[Back to original message]
|