Skip to content
Advertisement

Do not escape html stored as string (execute or process html string) [closed]

In PHP (WordPress theme function, trying to add html stored in theme options to blog header), I’m trying to get the following line:

JavaScript

To render html just like:

JavaScript

The results are different, the first one will display html tags while the second will process the html. Can someone please help. Thanks

Advertisement

Answer

Use single quotes

Single quotes vs double quotes in PHP

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement