How to convert this text <a href="">asd</a> into a link in html in PHP? I try through echo - displays the tag as text.

  • one
    I do not believe! 11 characters - Visman
  • all because of the content-type header: D which server is it worth! - Naumov
  • show the code that put this tag on the page. - Ivan Pshenitsyn

1 answer 1

You must enclose the text passed to echo in double quotes.

 echo "<a href='/'>link</a>"; 

And install Content-Type:text/html; charset=UTF-8 Content-Type:text/html; charset=UTF-8 .

  • one
    that's about content-type leave and write more, and remove the nonsense about quotes) - Ivan Pshenitsyn