导航到php页面的动态分配部分
我想导航到php页面的某个部分 动态分配一个节作为导航到php页面的动态分配部分,php,html,Php,Html,我想导航到php页面的某个部分 动态分配一个节作为 mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("somedb") or die(mysql_error()); $data = mysql_query("SELECT * FROM events") or die(mysql_error()); while($info = my
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("somedb") or die(mysql_error());
$data = mysql_query("SELECT * FROM events")
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
Print "<hr>";
Print "<section id=".$info['title'] .">";
Print "<h1>".$info['title'] . "</h1>";
echo nl2br ( $info['desc'],true ) ;
Print "</section>";}
?>
请提供帮助:)错误消息和StackOverflow语法高亮显示了问题。引号将字符串括起来,但字符串中有引号,需要转义,或者可以使用单引号将字符串括起来,这比转义双引号更容易阅读 这一行就是问题所在:
echo "<a href="events.php#.$info['title'].">"
echo”,为所使用的语言提供了更高级的功能。第91行是什么?index.php
Parse error: syntax error, unexpected 'events' (T_STRING) in C:\xampp\htdocs\IETE\index - Copy.php on line 91
echo "<a href="events.php#.$info['title'].">"
echo '<a href="events.php#' . $info['title'] . '">';
echo "<a href=\"events.php#" . $info['title'] . "\">";