미채택 완료

while 문 좀 봐주세요

2014-04-13 (일) 00:52:45 4,637
안녕하세요 
while 문 좀 봐주세요 
루프를 10개씩 나누어서 n건을 돌구고 싶은데 어떻게 하면되지요 ?

int num = n;
10건
while (num--){
insert (......);
n-10건 
insert (......);
}
|

답변 1개

자세히 알려주시면 도움드려볼께요
10개씩 나눠서 n건을 돌린다는게 어떤의미인가요?
 
<?php
/* example 1 */

$i = 1;
while (
$i <= 10) {
    echo 
$i++;  /* the printed value would be
                   $i before the increment
                   (post-increment) */
}

/* example 2 */

$i = 1;
while (
$i <= 10):
    echo 
$i;
    
$i++;
endwhile;
?>
 
자세하게 알려주시면 예제 만들어 드릴께요 ..
자세한건 쪽지주세요
 
 

답변을 작성하려면 로그인이 필요합니다.