Doc #64303 [Opn->Nab]: str_word_count with format = 2
| From: | frozenfire@php.net | Date: | Wed, 27 Feb 2013 03:55:19 +0000 |
| Subject: | Doc #64303 [Opn->Nab]: str_word_count with format = 2 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-9587@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64303&edit=1
ID: 64303
Updated by: frozenfire@php.net
Reported by: pierre at geobsd dot com
Summary: str_word_count with format = 2
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: Documentation problem
Operating System: FreeBSD
PHP Version: 5.4.12
Block user comment: N
Private report: N
New Comment:
The position of the first letter of a word, and the position of the word are
identical values. Unless I'm misunderstanding you, this isn't a bug. It's just a
different wording. In the context of this function's purpose, the wording of
"position of the word" is appropriate.
Previous Comments:
------------------------------------------------------------------------
[2013-02-26 13:13:46] pierre at geobsd dot com
Description:
------------
---
From manual page: http://www.php.net/function.str-word-count#refsect1-function.str-word-count-parameters
---
$str = "Hello friend, you're
looking good today!";
print_r(str_word_count($str, 2);
Thanks to the doc, "str_word_count" will return an associative array where the key is the
numeric position of the word inside the string and the value is the actual word itself.
Yes, this function returns an associative array but the key is the numeric position of the First
Letter of the word.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64303&edit=1