Scooter Daraf Scooter Daraf - 1 year ago 95
PHP Question

Get clickable anchor from database inside div

I have text field in database stored like that :

I like my <a href=''>Website</a>

So my variable is:

$text = "I like my <a href=''>Website</a> ";

and when i fetch it i get it like that

I like my <a href=''>Website</a>

How can i get it clickable like that ? thanks

I like my Website

Answer Source

You need to echo your text

echo $text;

If you receive encoded text, than use some decoding:

echo html_entity_decode($text);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download