while($row=mysql_fetch_array($result)){
echo "$row['NewsContent']";  //打印文章内容
}

解决方案 »

  1.   

    while($row=mysql_fetch_assoc($result)){
    echo "$row['NewsContent']";  //打印文章内容
    }
      

  2.   

    如果不想打开新页面,而在本页面显示详细内容的概要,可以使用Ajax实现
      

  3.   

    while($row=mysql_fetch_assoc($result)){
      echo $row['NewsContent'];  //打印文章内容
    }
    1、mysql_num_rows 返回的是下标数组,自然就不能用关联键访问了
    2、关联数组的元素放在双引号中时,只能写作
    "$row[NewsContent]"
    "{$row['NewsContent']}"
    之一
    "$row['NewsContent']"
    "{$row[NewsContent]}"
    都将出现语法错
      

  4.   

    看下文档三个函数区别mysql_num_rows
    mysql_fetch_array
    mysql_fetch_assoc