【发布时间】:2021-02-26 06:42:05
【问题描述】:
我无法从数据库中添加链接,如何解决。我想知道,如何将 DB 中的链接放在标签 a 中。
//names of available articles
function print_data($result_data)
{
while( ( $row = $result_data=>fetch_assoc() ) != false ){
// get all data about article and put it in variable row
echo "<a href="' . htmlspecialchars($row['text']) . '">GO </a>"."<br>"; // print names of articles
}
}
错误
解析错误: 语法错误,意外的“.htmlspecialchars($row[” (T_CONSTANT_ENCAPSED_STRING),在 D:... 中需要 ';' 或 ','第 29 行
【问题讨论】:
-
您真的应该将代码作为文本 NOT 作为图像发布到问题中!