将PHP变量值传递给HTML标签 [英] Pass PHP variable value into HTML label
本文介绍了将PHP变量值传递给HTML标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题,将php名称变量值传递给html中的标签
I have a problem that pass the php name variable value into the label in html
<ul><li><label class="control-label" value="<?php echo $name; ?>"></label></li></ul>
$name = "Example" ;
我的尝试:
我试图将变量$ name回显到标签中,但变量值没有出现在标签上。请帮我解决这个问题。我想要的输出是在标签中显示值Example。
What I have tried:
I have tried to echo the variable $name into the label, but the variable value didn't appear at the label. Please help me for this problem. The output i want is display the value "Example" into the label.
推荐答案
name; ?> > < / label > < / li > < / ul >
name; ?>"></label></li></ul>
name = 示例;
name = "Example" ;
我尝试过:
我试图将变量
What I have tried:
I have tried to echo the variable
名称回显到标签中,但变量值没有出现在标签。请帮我解决这个问题。我想要的输出是在标签中显示值示例。
name into the label, but the variable value didn't appear at the label. Please help me for this problem. The output i want is display the value "Example" into the label.
这篇关于将PHP变量值传递给HTML标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文