This script displays the way I need it to when I manually insert it into my script with the correct value for $expdat: <span style="background-color:yellow">Expires ' . $expdat . '. </span>
How should I escape the quotes to be able to echo it from a mysql table?
If I just INSERT it (as is) into a mysql table and echo it from there, it displays as: Expires ' . $expdat . '.