I have some basic PHP code:
$raceramps56["short"] = "My Test Product";
$leftMenu =
'<div class="leftMenuProductButton"><?PHP echo $raceramps56["short"] ?></div>';
Won’t echo the PHP code, only the element. I’ve tried things like
<div class="leftMenuProductButton">' . <?PHP echo $raceramps56["short"] ?>. '</div>';
Which just returns Parse error: parse error, unexpected '<'
So my question is, how do I either get this to work, or take another approach?
try this
$raceramps56["short"] = "My Test Product";$leftMenu ='<div class="leftMenuProductButton">'.$raceramps56["short"].'</div>';