Home >Backend Development >PHP Tutorial >How to output html format in original version in php

How to output html format in original version in php

WBOY
WBOYOriginal
2016-08-20 09:04:033007browse

How to ensure that the original format of HTML is maintained when rendering the content of the HTML page in the PHP program.
For example, I have the following html format tag content

<code><div class="content-show">
    <p class="description">$val['desc'];<p>
    <div class="con"><span>$val['note']</span> | <span>$val['category']</span></div>
</div></code>

Reply content:

How to ensure that the original format of HTML is maintained when rendering the content of the HTML page in the PHP program.
For example, I have the following html format tag content

<code><div class="content-show">
    <p class="description">$val['desc'];<p>
    <div class="con"><span>$val['note']</span> | <span>$val['category']</span></div>
</div></code>

I don’t know if you are talking about the fixed-term talisman! Output the final character as it is. Reference is as follows

<code>$html = <<<END
    <div class="content-show">
        <p class="description">$val['desc'];<p>
        <div class="con"><span>$val['note']</span> | <span>$val['category']</span></div>
    </div>
END;</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn