Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
导航到php页面的动态分配部分_Php_Html - Fatal编程技术网

导航到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

我想导航到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 = 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'] . "\">";