如何在PHP,html标签中回显 [英] How to echo in PHP, html tags

查看:96
本文介绍了如何在PHP,html标签中回显的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在发帖之前,我经历了这个过程:

如何在PHP中回显HTML?



仍然无法使用。



我试图回应一下:

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

但我仍然无法找到让标签和'消失的方法,我需要做什么?

解决方案

 <?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.

这篇关于如何在PHP,html标签中回显的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆