Created
July 1, 2020 15:49
-
-
Save robzlabz/48caea24146df404ae9e11d51abe77c5 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 | |
// kasus 1 | |
$kata = "aku adalah anak gembala "; | |
$hasil = str_replace('aku', 'kamu', trim(strtoupper($kata))); | |
// kasus 2 | |
$hasil = strtoupper($kata); | |
$hasil = trim($hasil); | |
$hasil = str_replace('aku', 'kamu, $hasil); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment