루프를 돌릴 때마다 while 루프 안에 라디오 버튼이 있고 라디오의 이름이 1 씩 증가합니다.
코드가 점진적으로 증가하지 않기 때문에 코드가 작동하지 않습니다. 어떤 제안이라도 좋을 것입니다.
$query = mysql_query("SELECT * FROM table WHERE id = '1' ORDER BY time ASC");
echo '<table> <th> A </th> <th> time </th> <th> B </th>';
while($row = mysql_fetch_assoc($query)) {
$i= 1;
echo '<tr><td>';
echo '<input type="radio" name="';echo $i++; echo'" /> '; echo $row['a'];
echo '</td>';
echo '<td>';
echo $row['time'];
echo '</td>';
echo '<td>';
echo '<input type="radio" name="';echo $i++; echo '" />'; echo $row['b'];
echo '</td> </tr> ';
}
echo '</tr></table>';
while 루프에서'$ i'를 1로 설정했습니다. – andrewsi
감사합니다. @ andrewsi 감사합니다. – Ricky