1

这是我的代码:

$sql= ("SELECT R.cr_id,R.time,R.reply,U.user_id,U.user_name FROM tb_user U, conversation_reply R WHERE R.user_id_fk=U.user_id and R.c_id_fk='$c_id' ORDER BY R.cr_id ASC LIMIT 20");
$stmt = $conn->prepare($sql);
$stmt->execute();
$row=$stmt->fetchAll();


foreach ($row as $laww) {

echo $laww['$user_name'].":". $laww['reply']. "<br>";
}

}////END 

我只得到 $laww['reply'] 的结果,而不是 $laww['$user_name'] 任何人都可以帮助我吗?

4

0 回答 0