-2
<?php
mysql_connect('localhost','root','root');
mysql_select_db('moodle');
$ht = "";
$sql = "select * from absence where username='iset' ";
$sql_query = mysql_query($sql);
while($row = mysql_fetch_object($sql_query)){
$ht += "<li>".$row->classe."</li>";
}
echo $ht;
?>
總是// 0 我有3行'缺席'用戶名='iset' 我認爲問題與$ ht但是!!! 謝謝先進PHP它堅持0?從數據庫獲取
喔thankssss,我忘記了這一點。 :D – smashp 2012-04-25 07:48:03
$ var + = $ var2;只有數字加起來或等於 – MrPHP 2012-04-25 08:09:12
準確地說,這就是爲什麼他得到零'0',因爲+ =產生一個數字。 – Aziz 2012-04-25 08:10:53