[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Function str_word_count()
satriaDate: Tuesday, 2011-01-18, 4:16 PM | Message # 1
Lieutenant colonel
Group: Administrators
Messages: 126
Reputation: 0
Status: Offline
$str = "Hello fri3nd, you're
looking good today!";

print_r(str_word_count($str, 1));
print_r(str_word_count($str, 2));
print_r(str_word_count($str, 1, 'àáãç3'));

echo str_word_count($str);

hasil:
Array
(
[0] => Hello
[1] => fri
[2] => nd
[3] => you're
[4] => looking
[5] => good
[6] => today
)

Array
(
[0] => Hello
[6] => fri
[10] => nd
[14] => you're
[29] => looking
[46] => good
[51] => today
)

Array
(
[0] => Hello
[1] => fri3nd
[2] => you're
[3] => looking
[4] => good
[5] => today
)

 
  • Page 1 of 1
  • 1
Search: