Created
January 2, 2017 11:40
-
-
Save ilhamarrouf/e2bdd604059c09b14607e1b17f3b3a2f to your computer and use it in GitHub Desktop.
PHP Function
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 | |
// Penulisan fungsi | |
function namadepan() | |
{ | |
echo "Muhamad"; | |
} | |
function namatengah() | |
{ | |
echo "Ilham"; | |
} | |
function namaakhir() | |
{ | |
echo "Arrouf"; | |
} | |
function spasi() | |
{ | |
echo " "; | |
} | |
// Fungsi didalam fungsi | |
function bersarang() | |
{ | |
namadepan() . spasi() . namatengah() . spasi() . namaakhir(); | |
} | |
// Penggunaan fungsi 'namafungsi();' | |
bersarang(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment