I've been trying to figure out how to include a variable name in a string without getting an error, but I can't find an answer and need some help.
The code I have is basically this:
$str = "The variable $var is pretty awesome";
I was the literal text "$var" to stay... but the text is user submitted, so I can't just make sure there's a \ in front of every variable.
Thanks in advance.