「PHP」while文で繰り返し処理のサンプル
構文
while( 条件 ) {
//条件が true の場合に行う処理コード
}
PHPコード
<?php
$i=0;
while ( $i<8 ) {
echo $i ."<br>\n";
$i++;
}
?>
結果
0
1
2
3
4
5
6
7
Coding Changes the World
構文
while( 条件 ) {
//条件が true の場合に行う処理コード
}
PHPコード
<?php
$i=0;
while ( $i<8 ) {
echo $i ."<br>\n";
$i++;
}
?>
結果
0
1
2
3
4
5
6
7