PHP ကျူတိုရီရယ်

PHP ပင်မစာမျက်နှာ PHP မိတ်ဆက် PHP ထည့်သွင်းပါ။ PHP Syntax PHP မှတ်ချက်များ PHP Variables များ PHP Echo / Print PHP Data အမျိုးအစားများ PHP စာတန်းများ PHP နံပါတ်များ PHP သင်္ချာ PHP Constants PHP Operator များ PHP If...Else...Elseif PHP Switch PHP Loops PHP လုပ်ဆောင်ချက်များ PHP Arrays PHP Superglobals PHP RegEx

PHP Forms

PHP Form ကိုင်တွယ်ခြင်း။ PHP Form Validation PHP Form လိုအပ်ပါသည်။ PHP Form URL/E-mail PHP Form ပြီးပါပြီ။

PHP အဆင့်မြင့်

PHP နေ့စွဲနှင့် အချိန် PHP ပါဝင်ပါတယ်။ PHP ဖိုင်ကိုင်တွယ်ခြင်း PHP ဖိုင်ကို ဖွင့်/ဖတ်ပါ။ PHP ဖိုင်ကို ဖန်တီး/ရေးပါ။ PHP ဖိုင်ကို တင်ခြင်း။ PHP Cookies PHP စက်ရှင်များ PHP Filters PHP Filters Advanced PHP ပြန်ခေါ်ခြင်းလုပ်ဆောင်ချက်များ PHP JSON PHP ခြွင်းချက်

PHP OOP

PHP OOP ဆိုတာဘာလဲ PHP အတန်းများ/အရာဝတ္ထုများ PHP Constructor PHP Destructor PHP Access Modifiers PHP Inheritance PHP Constants PHP Abstract အတန်းများ PHP မျက်နှာပြင်များ PHP လက္ခဏာများ PHP Static Methods PHP Static Properties PHP Namespaces PHP Iterables

MySQL ဒေတာဘေ့စ်

MySQL ဒေတာဘေ့စ် MySQL ချိတ်ဆက်မှု MySQL သည် DB ကိုဖန်တီးပါ။ MySQL ဇယားဖန်တီးပါ။ MySQL သည် Data ကိုထည့်သွင်းပါ။ MySQL နောက်ဆုံး ID ကိုရယူပါ။ MySQL တွင် Multiple ထည့်သွင်းပါ။ MySQL ပြင်ဆင်ထားသည်။ MySQL Data ကို ရွေးပါ။ MySQL ဘယ်မှာလဲ။ MySQL Order By MySQL က Data တွေကို ဖျက်လိုက်ပါ။ MySQL အပ်ဒိတ်ဒေတာ MySQL ကန့်သတ်ဒေတာ

PHP XML

PHP XML ပါဆာများ PHP SimpleXML Parser PHP SimpleXML - ရယူပါ။ PHP XML Expat PHP XML DOM

PHP - AJAX

AJAX နိဒါန်း AJAX PHP AJAX ဒေတာဘေ့စ် AJAX XML AJAX တိုက်ရိုက်ရှာဖွေမှု AJAX စစ်တမ်း

PHP ဥပမာများ

PHP ဥပမာများ PHP Compiler PHP Quiz PHP လေ့ကျင့်ခန်းများ PHP Certificate

PHP အ ကိုးအကား

PHP ခြုံငုံသုံးသပ်ချက် PHP Array PHP ပြက္ခဒိန် PHP နေ့စွဲ PHP လမ်းညွှန် PHP အမှား PHP ခြွင်းချက် PHP ဖိုင်စနစ် PHP Filter PHP FTP PHP JSON PHP သော့ချက်စာလုံးများ PHP Libxml PHP Mail PHP သင်္ချာ PHP ထွေ PHP MySQLi PHP ကွန်ရက် PHP Output Control PHP RegEx PHP SimpleXML PHP Stream PHP String PHP Variable ကိုင်တွယ်ခြင်း။ PHP XML Parser PHP Zip PHP အချိန်ဇုန်များ

PHP str_word_count() လုပ်ဆောင်ချက်

❮ PHP String အကိုးအကား

ဥပမာ

"Hello World!" ဟူသော စာကြောင်းတွင် တွေ့ရသော စကားလုံးအရေအတွက်ကို ရေတွက်ပါ-

<?php
echo str_word_count("Hello world!");
?>

အဓိပ္ပါယ်နှင့် အသုံးပြုမှု

str_word_count() လုပ်ဆောင်ချက်သည် စာကြောင်းတစ်ခုရှိ စကားလုံးအရေအတွက်ကို ရေတွက်သည်။


အထားအသို

str_word_count(string,return,char)

ကန့်သတ်တန်ဖိုးများ

Parameter Description
string Required. Specifies the string to check
return Optional. Specifies the return value of the str_word_count() function.

Possible values:

  • 0 - Default. Returns the number of words found
  • 1 - Returns an array with the words from the string
  • 2 - Returns an array where the key is the position of the word in the string, and value is the actual word
char Optional. Specifies special characters to be considered as words.


နည်းပညာဆိုင်ရာအသေးစိတ်

ပြန်ပို့တန်ဖိုး- ရွေးချယ်ထားသော ကန့ ် သတ် ချက်အပေါ်မူတည်၍ နံပါတ်တစ်ခု သို့မဟုတ် အခင်းတစ်ခုအား ပြန်ပေးသည်။
PHP ဗားရှင်း- 4.3.0+
ပြောင်းလဲမှုမှတ်တမ်း- char parameter ကို PHP 5.1 တွင် ထည့်သွင်းခဲ့သည်

နောက်ထပ် ဥပမာများ

ဥပမာ

string မှ စကားလုံးများဖြင့် array တစ်ခုကို ပြန်ပေးသည်-

<?php
print_r(str_word_count("Hello world!",1));
?>

ဥပမာ

သော့သည် စာကြောင်းရှိ စကားလုံး၏ အနေအထားဖြစ်သည့် array တစ်ခုကို ပြန်ပေးကာ တန်ဖိုးသည် တကယ့်စကားလုံးဖြစ်သည်-

<?php
print_r(str_word_count("Hello world!",2));
?>

ဥပမာ

char parameter မပါဘဲ၊

<?php
print_r(str_word_count("Hello world & good morning!",1));
print_r(str_word_count("Hello world & good morning!",1,"&"));
?>

❮ PHP String အကိုးအကား