頁:
[1]
sqlsrv_fetch_array 拿不出完整的資料??
<?php$qry="select * from table";$sql=sqlsrv_query($connection,$qry);
$read=sqlsrv_fetch_array($sql);
?>
<input type="textbox" value=<?= $read ?>>
username=hello word
上面這個是我在網頁的寫法,
但是網頁它只顯示"hello"而已,為什麼會這樣的?
有其他方式能拿出來完整的句子嗎?
<div></div> 不太清楚你想問的問題
你是$read["username"]取不到值?
還是$read["username"]取出來的值錯誤? chengpocheng 發表於 2018-12-27 01:49 PM static/image/common/back.gif
不太清楚你想問的問題
你是$read["username"]取不到值?
還是$read["username"]取出來的值錯誤? ...
取出來的有缺少一部分的值 本帖最後由 chengpocheng 於 2018-12-27 02:05 PM 編輯
了解,你用chrome查看
<input type="textbox" value=<?= $read ?>>
這一行在html顯示的是不是也只有
<input type="textbox" value="hello">
(在textbox按滑鼠右鍵 => 檢查)
chengpocheng 發表於 2018-12-27 02:04 PM static/image/common/back.gif
了解,你用chrome查看
查到了,謝謝
確實是沒有放("")的問題<br><br><br><br><br><div></div>
頁:
[1]