您的位置:首页 > 编程语言 > PHP开发

html 在php中echo html 时引号的使用

2016-05-24 23:08 603 查看
<?php
foreach ($unpinpointed as $user) {
echo "<div class='list-group-item'>
<div class='pull-right'>
<button style='margin-right: 15px' type='button' class='btn btn-info' aria-label='Envelope' data-userid=$user[id] data-email=$user[email] ></button>
<a href='tel:".$user['phonenumber']."'>
<button type='button' class='btn btn-info' aria-label='Earphone'>
<span class='glyphicon glyphicon-earphone' aria-hidden='true'></span>
<span hidden>$user[phonenumber]</span>
</button>
</a>
</div>";
}
?>

引号要注意!!!

调用HTML的电话功能 <a href='tel:".$user['phonenumber']."'> 方括号内必须用引号

其他的方括号内一定不能用引号
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: