I am trying to insert code in a php string dynamically. A simplified example would be:
echo "two plus three equals {2+3}"; //the code in the brackets would evaluate to 5
I know this can be done easily beforehand with:
$var = 2+3;
echo "two plus three equals $var";
But is it possible without the extra variable step or using eval?