ITmembers.net 아카이브 · 2002–2009

질문과 답변

[re] while 관련

현재 그 값이 while문 속에 들어 있거던요..


$query="select * from 테이블명 by num desc";
$result=mysql_query($query);
while($row=mysql_fetch_array($result))
{

//---답변 주신 내용----
if($row[a]==$temp){
$row[a]="<font color='red'>$row[a]</font>";
}else{
$row[a]="$row[a]";
}
$temp=$row[a];
//-------------------

$auto=$total_record-$offset-$i;
$i++;

echo "<tr bgcolor='#FFFFFF'>
         <td height='30' width='100'><p align='center'>$row[a]</p></td>
         <td height='30' width='100'><p align='center'>$row[b]</p></td>
          <td height='30' width='100'><p align='center'>$row[c]</p></td>
          <td height='30' width='100'><p align='center'>$row[e]</p></td>
          <td height='30' width='100'><p align='center'>$row[f]</p></td>
        </tr>
";      
}

댓글 1