从数据库检索值并将其应用于锚标记时出错. [英] Error when retrieving value from database and applying to anchor tag.

查看:75
本文介绍了从数据库检索值并将其应用于锚标记时出错.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想链接到从数据库中检索到的值,但是以下代码出现错误:

I want to give link to the retrieved value from database but the error is coming for the below code:

Print " <td>" "<a href="#">".$info['shopname'] ."</a>" "</td> ";

解析错误:语法错误,第14行的C:\ xampp \ htdocs \ test.php中出现意外的T_CONSTANT_ENCAPSED_STRING

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\test.php on line 14

所以请更正它如何在打印语句中应用多个html标记

So please rectify it how to apply multiple html tags in print statement

推荐答案

可以尝试一下吗,

 echo  " <td><a href='#'>".$info['shopname'] ."</a></td>";

OR

print  " <td><a href='#'>".$info['shopname'] ."</a></td>";

这篇关于从数据库检索值并将其应用于锚标记时出错.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆