This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (kondisi) { | |
statement; | |
statement; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for {start; condition; increment) { | |
statement; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (kondisi) { | |
statement; | |
} elseif (kondisi2) { | |
statement2; | |
} elseif (kondisi3) { | |
statement3; | |
} else { | |
statement4; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (kondisi) { | |
statement; | |
} else { | |
statement; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
for ($i = 1; $i <= 10; $i++) { | |
echo $i . "\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$parameter = true; | |
while ($parameter) { | |
echo "hello \n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nilai = 90; | |
if ($nilai > 60) { | |
echo 'nilai cukup'; | |
} elseif ($nilai >70) { | |
echo 'niilai baik'; | |
} elseif ($nilai > 90) { | |
echo 'nilai sangat baik'; | |
} else { | |
echo 'nilai kurang'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nilai = 70; | |
if ($nilai > 60) { | |
echo 'lulus'; | |
} else { | |
echo 'mengulang'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>PHP di HTML</h1> | |
<?php | |
echo "Hello World! <br> Lorem Ipsum"; | |
?> |
OlderNewer