你好,我试图在php中循环时发挥功能,但无法在这里获得写入是我的代码
function mail_detail($mail_detail){
$data= mysql_query("select * from messages where messages.to = $mail_detail and to_viewed = 0 ORDER BY messages.id DESC");
while ($result= mysql_fetch_array($data)){
return $result;
}
}
并公布,
$mail_detail= mail_detail($userid)
echo <li class="read">
<a href="#">
<span class="message"> . $mail_detail[ title ]. </span>
<span class="time">
January 21, 2012
</span>
</a>
</li> ;
i am not getting all values just getting one value please help thx