且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在PHP,html标签中回显

更新时间:2023-11-14 15:58:16

 <?php 

echo'< div>
< h3>< a href =#>第一< / a>< / h3>
< div> Lorem ipsum dolor sit amet。< / div>
< / div>
< div>';

?>

只需放在单引号中。


I went through this before posting:

How can I echo HTML in PHP?

And still couldn't make it work.

I'm trying to echo this:

<div>
 <h3><a href="#">First</a></h3>
 <div>Lorem ipsum dolor sit amet.</div>
</div>
<div>

But I still can't find a way to make the tags "" and '' disappear, what do I have to do?

<?php

echo '<div>
 <h3><a href="#">First</a></h3>
 <div>Lorem ipsum dolor sit amet.</div>
</div>
<div>';

?>

Just put it in single quotes.