<code><?phpmysql_connect('localhost','root','');mysql_select_db('test');mysql_query('set name uft8');$sql='select * from tset';$result=mysql_query($sql);?><?php<?php while($row=mysql_fetch_array($result)):菜单:<?php $row['username']?>选项二选项三 <?php endwhile?>?></code>
这样好像不行 该咋循环捏
回复内容:
<code><?phpmysql_connect('localhost','root','');mysql_select_db('test');mysql_query('set name uft8');$sql='select * from tset';$result=mysql_query($sql);?><?php<?php while($row=mysql_fetch_array($result)):菜单:<?php $row['username']?>选项二选项三 <?php endwhile?>?></code>
这样好像不行 该咋循环捏
<body>
<?php
标签不能嵌套吧
本文来源gao@!dai!ma.com搞$$代^@码!网!搞gaodaima代码
多了一个<?php
<?php $row['username']?>
修改成 <?php echo $row['username']?>
<code><?phpmysql_connect('localhost','root','');mysql_select_db('test');mysql_query('set name uft8');$sql='select * from tset';$result=mysql_query($sql);?>菜单: <?php while($row=mysql_fetch_array($result)):?> "><?=$row['username']?> <?php endwhile?> </code>