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

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

问题描述

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

如何在 PHP 中回显 HTML?

我仍然无法让它工作.

我试图回应这个:

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

但我仍然找不到将标签设为"的方法.和''消失.我该怎么办?

解决方案

只需将其放在单引号中即可.

I went through this before posting:

How can I echo HTML in PHP?

And I 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天全站免登陆