新手请教html里混编php 不输出的原因

WBOY
Release: 2016-06-23 14:20:30
Original
821 people have browsed it

php html 数据库 mysql

<table whidth=500 border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#add3ef">  <?    $sql="select * from message";    $query=mysql_query($sql);    while($row=mysql_fetch_array($query))    {   ?>      <tr>        <td>标题:<?=$row[title]?> 用户: <?=$row[user]?> </td>      </tr>      <tr>        <td>内容:<?=$row[title]?></td>      </tr>   <?   }   ?></table>
Copy after login

$row[title]从数据库取出的都输出为空,  单独循环就可以输出来,这是什么 原因啊?

回复讨论(解决方案)

短标记功能开启了没,没有的话 =$row[title]?> 改为: 

谢谢  问题解决拉 ~   

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template