[英]Parse error: syntax error, unexpected 'href' (T_STRING), expecting ',' or ';'
Getting error in this code...please help... i have changed it also like.... 这段代码中出现错误...请帮助...我也已经更改了....
echo "<td>" <a href="get_file.php?id={.$row['quote_id']. }">Download</a>"</td>";
or 要么
<td><a href='get_file.php?id={$row['id']}'>Download</a></td>
still getting the error. 仍然出现错误。
This should work for you: 这应该为您工作:
(You don't concat the strings correctly and you forgot quotes for the href tag) (您没有正确连接字符串,并且忘记了href标记的引号)
echo "<td><a href='get_file.php?id=" . $row['quote_id'] ."'>Download</a></td>";
Concatenation is your friend when outputting HTML. 在输出HTML时,串联是您的朋友。
echo '<td><a href="get_file.php?id={'.$row["quote_id"].'}">Download</a></td>';
I usually try to put the single quotes on the outside and the double quotes on the inside because it's easier for me to manage. 我通常尝试将单引号放在外面,将双引号放在里面,因为它更易于管理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.