Home > Backend Development > PHP Tutorial > 新手请问html里混编php 不输出的原因

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

WBOY
Release: 2016-06-13 12:39:02
Original
790 people have browsed it

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

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

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

php html 数据库 mysql
Related labels:
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