Created
March 9, 2018 12:47
-
-
Save wichaksono/3ed51bb5ef57b23956ce7c0c2a28d5db to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
if ( $a == '' ) { // jika $a kosong | |
echo 'nilai a tidak boleh kosong'; | |
} else if($b == '' ) { // if kedua akan dijalankan ketika if pertama menyatakan bahwa $a memiliki nilai. disini kita akan mengechek nilai b, berisi / tidak | |
echo 'nilai b tidak boleh kosong'; | |
} else if ( $a > $b ) { | |
echo 'benar'; | |
} else { | |
echo 'salah'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment