【发布时间】:2016-01-02 21:22:36
【问题描述】:
我无法在 html 标记中打印已在 php 标记中回显的变量?我想在 h1 标记中打印 $A 变量。我的代码:
<?php
while($pr = mysql_fetch_assoc($qAccess))
{
$id=$pr["user_id"];
$A=$pr["name"];
}
echo "<html
<!-- Profile info -->
<div id='profile_info'>
<h1 id='name' class='transition-02'>$A</h1>
<h4 class='line'>no heading</h4>
<h6><span class='fa fa-map-marker'></span> San Francisco , CA</h6>
</div>
<!-- End Profile info -->
</html>" ;
?>
【问题讨论】:
-
有什么问题?你有任何错误吗?你得到了什么,你期望什么?
-
应该已经可以了 :) eval.in/445359
-
它与无标题和加利福尼亚州旧金山相呼应。这是你所期待的吗?
-
应该关闭。