Last active
January 2, 2017 22:59
-
-
Save ilhamarrouf/e178534cdaea6ffd9c27449d6781933b 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 | |
// Contoh 1 | |
function perkalian ($x, $y, $z) | |
{ | |
$hasil = $x * $y * $z; | |
return $hasil; | |
} | |
echo perkalian(2, 2, 7); | |
echo "<br>"; | |
// Contoh 2 | |
function contoh2 ($x, $y, $z) | |
{ | |
return $hasil = $x * $y * $z; | |
} | |
echo contoh2(5, 5, 5); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment