Given what you posted for code and if I am getting what you're asking is that you need to encase the echo'd line in single quotes.
Why? Because, the
$ signs are interpreted as variable assignments in doubled quotes and PHP is trying to parse them as such.
It may even throw undefined variables notices.
You can also
var_dump() the said row/variable or echo the row from the query.