Example:
Code: Select all
$desc_apple = "A juicy red apple"; $desc_pear = "A sweet tasting pear.";
// ....
$show = '$desc_' . "$fruits[$this]"; // $desc_ is the fixed prefix and not the variable so I put it in single quotes.
echo $show;
Code: Select all
$desc_appleI even tried things like $show = ${'$desc_' . $fruits[$apple]}; and with no luck. I'm sure I'm being dense, but I don't get it. Help please?