Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Find Karakter #87

Merged
merged 1 commit into from
Oct 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Create Find Karakter
  • Loading branch information
am-523 authored Oct 2, 2021
commit 317536941faa36cf5a537977d52c86e7e1c517db
14 changes: 14 additions & 0 deletions Find Karakter
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
$kalimat="Saya sedang belajar pemrograman string PHP";
$dicari ="nonton";
?>
<p>Kalimatnya adalah: "<?php echo $kalimat?>"</p>
<p>Kata yang di cari: <u><?php echo $dicari?></u></p>
<?php
if(preg_match("/$dicari/i", $kalimat)) {
echo 'Kata <b>'.$dicari.'</b> ditemukan.';
}
else {
echo 'Kata <b>'.$dicari.'</b> tidak ditemukan.';
}
?>