If you want a table row, you could always just use the modulus operator to see if $i (which you have to set up) is divisible by 3. If so, start a new row, otherwise, continue. Something like:
$i=0;
while($row = mysql_fetch_array($result))
{
// If $i / 3 has no remainder (i.e. $i == 3, 6, 9, 12, 15, etc.)
if($i%3==0)
echo '<tr>';
$value =htmlspecialchars($row['value']);
echo "<TD colspan=3><input type=Checkbox value=$id>$value</TD>";
}
echo '</tr>';
Hope that helps...