PHP while

Jmnote (토론 | 기여)님의 2021년 9월 30일 (목) 14:40 판 (→‎예시)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

PHP while
  • 특정 조건이 true인동안 반복하는 반복문

2 예시[ | ]

$x = 1;
while($x <= 5) {
  echo "[$x]"; # [1][2][3][4][5]
  $x += 1;
}
$x = 1;
while($x <= 5):
  echo "[$x]"; # [1][2][3][4][5]
  $x += 1;
endwhile;

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}