Home  >  Article  >  Backend Development  >  新手请教html里混编php 不输出的原因

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

WBOY
WBOYOriginal
2016-06-23 14:20:30781browse

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>

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

回复讨论(解决方案)

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

谢谢  问题解决拉 ~   

Statement:
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