在html页脚中组合php变量
我的web应用程序中有一个php变量,它是在html页脚中组合php变量,html,variables,Html,Variables,我的web应用程序中有一个php变量,它是$companyname,它来自代码中其他地方的一个会话变量,我知道它是通过使用简单的echo进行测试来工作的 我已经用HTML编写了我的页脚,如下所示: <!DOCTYPE html> <html> <body> <footer> <p>This information belongs to . $companyname . if you are not the intended rec
$companyname
,它来自代码中其他地方的一个会话变量,我知道它是通过使用简单的echo进行测试来工作的
我已经用HTML编写了我的页脚,如下所示:
<!DOCTYPE html>
<html>
<body>
<footer>
<p>This information belongs to . $companyname . if you are not the intended recipient please contact the owner or send us an <a href="mailto:someone@example.com">email </p>
<p>All rights reserved 2015</p>
</footer>
</body>
</html>
此信息属于$公司名称。如果您不是预期的收件人,请联系所有者或向我们发送电子邮件
另外,如果不太麻烦的话,我希望$companyname是粗体的,您可以在
块之外使用HTML。因此,在HTML中输出php变量基本上是:
<!DOCTYPE html>
<html>
<body>
<footer>
<p>This information belongs to <?php echo $companyname; ?> if you are not the intended recipient please contact the owner or send us an <a href="mailto:someone@example.com">email </p>
<p>All rights reserved 2015</p>
</footer>
</body>
</html>
此信息属于您,如果您不是预期的收件人,请联系所有者或向我们发送电子邮件
2015年保留所有权利
但是,您没有提供HTML是如何生成的信息,因此在此无法再提供帮助。谢谢您的帮助,现在看来,如果您不是。。。但是,有人能告诉我如何获得粗体的回音吗?请使用HTML标记,而不是php此信息属于,如果您不是…
谢谢,这就成功了,好的,一个小问题,php变量之后的所有内容现在都是粗体的,使用此信息属于,如果您不是预期的收件人,请与所有者联系或向我们发送电子邮件