You are here: str_word_count « PHP Programming Language « IT news, forums, messages
str_word_count

Posted by Peter Münster on 10/01/72 11:56

Hello,

on page http://www.php.net/manual/en/function.str-word-count.php
it's stated that: "For the purpose of this function, 'word' is defined as a
locale dependent string"

But it does not seem to work, the output of the following script is
string(10) "fr_FR.utf8" Array ( [0] => hello [1] => conomie [2] => bla )

I think, that "économie" should be recognized as word.

Here is the test-script:

<?
echo '<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head><body>';
var_dump(setlocale(LC_ALL, 'fr_FR.utf8'));
print_r(str_word_count('hello économie bla, 1));
echo '</body></html>';
?>

Could someone help please?
My PHP version is 5.1.2.

Greetings, Peter

--
email: pmrb at free.fr
http://pmrb.free.fr/contact/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация