[PHP] - 한번에 4칸씩 반복 예제 (질문은 댓글로....)

PHP 2011. 7. 13. 09:34
반응형

<table width="100%" border="1" cellpadding="0" cellspacing="0">
       <?if($total == ""){?>
       <?
         }else{
       ?>
        <tr>
       <?
          $i = 1;
          while ($row = mysql_fetch_array($result)){
       ?>
       <td>
        123
       </td>
       <?
         if($i % 4 == 0){
          echo "</tr><tr>";
         }

        $i = $i + 1;
        }
         echo "<p></p></tr>";
       }
       ?>
     </table>

반응형
: