views:

25

answers:

0

I have the following variable being dynamically set by user generated content:

$variable = <a href="http://www.mysite.com/article"&gt;This Article</a>;

When this variable is set, I then echo it as such

echo $variable;

I know that as is, this wouldn't be valid because I would need to escape the double quotes etc.

I'm a total beginner and I am hoping that someone could point out a way to automate the process to make the variable printable as a clickable link, thus escaping the quotes in my variable automatically?