[英]php code inside a href tag not working
I would like to redirect to other pages but the =
sign isn't working, the page name, the title, and the id are coming from database. 我想重定向到其他页面,但是
=
符号不起作用,页面名称,标题和ID来自数据库。 I tried putting .
我试过推杆
.
before the =
but that doesn't work. 在
=
之前,但这不起作用。 I think this should be simple but couldn't figure it out. 我认为这应该很简单,但无法弄清楚。 can someone help me out?
有人可以帮我吗?
echo "<a href=".$row['page']=.$row['topic']."& id=".$row['id'].">".click here."</a>";
尝试像
echo "<a href='".$row['page']."=".$row['topic']."&id=".$row['id']."'>click here</a>";
像这样 ?
echo '<a href="' . $row['page'] . '=' . $row['topic'] . '&id=' . $row['id'] . '">click here</a>';
You were just missing a few quotes and dots. 您只是缺少一些引号和圆点。 This will work.
这将起作用。
echo "<a href='".$row['page']."=".$row['topic']."&id=".$row['id']."'>click here</a>";
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.