print_r($rows)显示也的结果:
Array ( [0] => Array ( [0] => 1 [id] => 1 [1] => 1 [category_id] => 1 [2] => 凤惑天下 [name] => 凤惑天下 [3] => 简介省略 [description] => 简介省略 [4] => 206013.jpg [pic] => 206013.jpg ) )为什么在table里面
<input type="text" name="id" value="<?php echo $rows[id]?>" size="40" maxlength="40"  /></th></tr>没有显示呢
请各位朋友帮忙 ....................急
<?php
include_once("getconn.php");
$id = $_GET['id'];
if(!empty($id)){
 $sql="select * from picture where id='$id'";
 $rows=$con->query($sql);
 print_r($rows);}
?><table broder="1"><tr><th>编号:</th><th>
  <input type="text" name="id" value="<?php echo $rows[id]?>" size="40" maxlength="40"  /></th></tr>

解决方案 »

  1.   


    <input type="text" name="id" value=" <?php echo $rows['id']?>" size="40" maxlength="40"  /> 
      

  2.   

    print_r($rows)显示也的结果:
    Array ( [0] => Array ( [0] => 1 [id] => 1 [1] => 1 [category_id] => 1 [2] => 凤惑天下 [name] => 凤惑天下 [3] => 简介省略 [description] => 简介省略 [4] => 206013.jpg [pic] => 206013.jpg ) )<table broder="1">
    <tr> <th>编号: </th> <th>
      <input type="text" name="id" value=" <?php echo $rows[id]?>" size="40" maxlength="40"  /> </th> </tr>
    -------------------------------请注意红色部分,应该是$rows[0]['id']才对吧?
      

  3.   

    ....谢谢各位的解答....已经解决.原于我对二维数组的不熟悉....请注意红色部分,应该是$rows[0]['id']才对吧? 已经修改..