Case Conversion Di PHP

Case Conversion Di PHP

Create: SaldiSaldi | Jumat, 17 Maret 2017 | 00:03:13 WITA | dibaca: 1213

Assalamualaikum wr. wb. Kali ini saya akan berbagi sedikit tutorial tentang case conversion di php

 

Dalam tutorial belajar PHP kali ini saya akan membahas tentang case conversion, case conversion biasa di gunakan untuk mengubah huruf besar ke kecil ataupun sebaliknya dan kali ini saya akan membahas 4 fungsi bawaan PHP yang bisa digunakan untuk keperluan ini: strtolower(), strtoupper(), ucfirst() dan ucwords(), tidak usah panjang lebar langsung saja ke TKP.

 

<?php

$kalimat = "DIPANEGARA COMPUTER CLUB";

$kalimat_baru = strtolower($kalimat);

echo $kalimat_baru;

?>

 

Untuk mengubah huruf besar ke kecil di dalam PHP, bisa menggunakan fungsi strtoupper().

Berikut adalah contoh penggunaan fungsi strtoupper() di dalam PHP:

<?php

$kalimat = "dipanegara computer club";

$kalimat_baru = strtoupper($kalimat);

echo $kalimat_baru;

?>

 

Fungsi ucfirst()  berfungsi untuk mengubah huruf pertama awal string menjadi huruf besar.

Berikut adalah contoh penggunaan fungsi ucfirst() di dalam PHP:

<?php

$kalimat = "dipanegara computer club";

$kalimat_baru = ucfirst($kalimat);

echo $kalimat_baru;

?>

Fungsi ucwords()  berfungsi untuk mengubah huruf pertama dalam setiap kata menjadi huruf besar.

Berikut adalah contoh penggunaan fungsi ucwords() di dalam PHP:

<?php

$kalimat = "dipanegara computer club";

$kalimat_baru = ucwords($kalimat);

echo $kalimat_baru;

?>

Jika anda ingin agar semua karakter ‘seragam’ dimana huruf pertama setiap kata dalam huruf besar, dan kata lain dalam huruf kecil, kita bisa menkombinasikan fungsi strtolower() dengan fungsi ucwords()

<?php

$kalimat = "Dipanegara Computer CLUB DCC";

$kalimat_kecil = strtolower($kalimat);

$kalimat_baru = ucwords($kalimat_kecil);

echo $kalimat_baru;

?>

Screenshoot Code :

 cc1

 

Screenshoot Hasil :

cc2 

 

Semoga tutorial sederhana ini dapat bermanfaat Terimakasih.. 



28 KOMENTAR

Agen SNE Kapsul Herbal di Pekalongan | 17 Maret 2017 || 14:11:40
" Terimakasih untuk informasi yang telah dibagikan http://ow.ly/A03o309Zo8F "
Agen SNE Kapsul Herbal di Kediri | 20 Maret 2017 || 14:09:55
" Terimakasih atas informasi yang telah dibagikan http://ow.ly/P0oG30a3O8T "
Agen RG-GL DXN | 20 Maret 2017 || 14:48:59
" Terimakasih atas informasi yang telah dibagikan http://ow.ly/SvBF30a3Zmc "
Beli Obat Jantung Koroner Tasly ICP Capsule di Jambi | 22 Maret 2017 || 13:42:38
" Terimakasih atas informasi yang telah dibagikan http://ow.ly/qsMt30a8yeH "
best writing service | 22 Maret 2017 || 22:16:31
" This post has very good information regarding case conversion in PHP which has helped me a lot for my college project assignment which I must present to my computer professor. I have been searching for this type of post and checked many tutorials to get this coding part at last I found in your post which is good thing. "
Agen SNE Kapsul Herbal di Tegal | 23 Maret 2017 || 13:46:18
" Terimakasih atas informasi yang telah dibagikan http://bit.ly/2o6LEyi "
Agen SNE Kapsul Herbal di Binjai | 23 Maret 2017 || 15:13:57
" Terimakasih atas informasi yang telah dibagikan http://bit.ly/2nfCwd4 "
Survival games | 22 Agustus 2017 || 14:34:32
" You have done great work, nice to read this interesting post, i want to say thanks for sharing this post. "
profil tukang taman | 13 September 2017 || 10:37:43
" thanks for share "
Obat Aborsi Pekanbaru | 30 Oktober 2017 || 00:27:52
" Terimakasih atas informasi "
obat forex bandung | 28 November 2017 || 07:34:54
" makasih "
Kolkata Escorts | 04 Desember 2017 || 12:42:32
" Beauti Queen amazing kolkata escorts agency alwyas ready for you at your doorstep. Beauti Queen provide you high profile independent girl in kolkata, escorts service in kolkata, kolkata escorts. If you are looking for the ultimate encounter in Kolkata then I am your sophisticated young Kolkata escorts that provides upscale companionship for making your night becomes true. "
instagram online | 10 Januari 2018 || 12:25:15
" Cool post! I'm looking for this information! Thank you for sharing. Hope to see more updates. "
<a href="http://www.renudas.in/">Kolkata Escorts</a> | 24 Januari 2018 || 21:29:36
" Renu Das Kolkata Escorts Services has gorgeous females provides Independent Escorts Service in Kolkata call girls at 100% satisfaction with VIP models. Provided Kolkata escorts at our agency are professional in nature and are eager to serve you at your place. <a href="http://www.renudas.in/">Kolkata Escorts</a> <a href="http://www.renudas.in/">Escorts in Kolkata</a> http://www.renudas.in "
Ahmedabad escorts | 01 Mei 2018 || 12:58:17
" http://www.sakshipatel.com/ The Ahmedabad escorts young female are extremely magnificent in the matter of guaranteeing outright fulfillment to every single customer with the goal that the escort young ladies are constantly ready to keep themselves. "
Ahmedabad escorts | 01 Mei 2018 || 12:59:08
" My customers are valuable for me and I give them all Call Girls in Ahmedabad. I am exceptionally hot young female and regularly anxious to meet a person that can demolish me on bed delicately. "
Ahmedabad escorts | 01 Mei 2018 || 12:59:59
" This is an as routinely as likely refreshed Ahmedabad escorts photograph patio, you can see here fair the real lady friends who adjacent as Independent escorts in Ahmedabad these days. "
Ahmedabad escorts | 01 Mei 2018 || 13:00:46
" The Ahmedabad Escorts models that come to you are lovely and extremely alluring and in addition tempting, warm, extensive, and satisfying. "
Ahmedabad escorts | 01 Mei 2018 || 13:01:49
" You can explore a decision of female escort organizations whose models make from a wide assembly of grants and details "
Surat Call Girl | 01 Mei 2018 || 13:16:28
" Escorts in Surat are prepared to give all of you sorts of assistance, with the goal that you can feel loose. "
Call Girls in Surat | 01 Mei 2018 || 13:17:15
" Our Surat Escort Agency offers you wonderful young ladies with prominent who are prepared to work with you in such sort of fulfillment. "
Surat Escorts | 01 Mei 2018 || 13:18:03
" delightful and attractive escort young lady and the rest is his duty, to ensure that you will come here to satisfy your desire "
Surat Escorts Srvice | 01 Mei 2018 || 13:18:34
" You can invest lovely energy with these provocative, alluring ladies and appreciate what is wonderful and how to satisfy your wants. "
Rajkot Escorts | 01 Mei 2018 || 18:44:13
" Welcome to the International city Rajkot, universe of Call young ladies who needs fulfillment and we are pleased to state that you are in a place which is the home for all kind of call young ladies over the world. "
Call Girls in Rajkot | 01 Mei 2018 || 18:44:36
" Appreciate any sort of young lady, regardless of whether you are Indian, Chinese, Russian, Desi, College, a nonnative, a considerable measure of youngsters to decide for you. "
Rajkot Call Girl | 01 Mei 2018 || 18:44:55
" Escort Service Gujrat Rajkot, You have achieved your goal of finding excellent, provocative, enchanting and appealing ladies. All things considered, this place invites you into the universe of nonnatives where you will discover genuine and genuine wellspring of sex, desire, love and fun each minute. "
spanish dictionary | 14 Juni 2018 || 15:17:56
" I feel it interesting, your post gave me a new perspective! I have read many other articles about the same topic, but your article convinced me! I hope you continue to have high quality articles like this to share with veryone! "
spanish dictionary | 14 Juni 2018 || 15:18:17
" I feel it interesting, your post gave me a new perspective! I have read many other articles about the same topic, but your article convinced me! I hope you continue to have high quality articles like this to share with veryone! "



ISI KOMENTAR

NAMA

WEBSITE

KOMENTAR


Captcha Sepakbola
Apakah anda manusia?Lebih baik lagi kalau anda menyukai sepak bola
Sebutkan pemain sepak bola disamping:

Captcha Sepakbola by codingwear








  • $DCC = NEW XXI("Solidaritas","Loyalitas","Kualitas");
  • PELATIHAN KAMPUS
  • Pelatihan Komputer (DIGITAL SCHOOL)
  • Study Tour GoTv
  • IT FUN