Format :
for(Variabel = Nilai1; Variabel < Batas; Variabel++)
{
Statement;
}
?>
Contoh :
<?php
for($n = 1; $n <= 9; $n++)
{
echo $n . '<br />';
}
?>
Hasil :
1
2
3
4
5
6
7
8
9
for(Variabel = Nilai1; Variabel < Batas; Variabel++)
{
Statement;
}
?>
<?php
for($n = 1; $n <= 9; $n++)
{
echo $n . '<br />';
}
?>
1
2
3
4
5
6
7
8
9
0 comments:
Post a Comment