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
Release: 2016-08-20 09:04:03
Original
2981 people have browsed it

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>
Copy after login
Copy after login

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>
Copy after login
Copy after login

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>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template