note 75869 added to function.count
| From: | kodra22 at gmail dot com | Date: | Tue, 19 Jun 2007 21:02:30 +0000 |
| Subject: | note 75869 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-127800@lists.php.net to get a copy of this message | ||
I've come across a problem I can't explain.
in my testing I've used this piece of code:
print_r($baseText);
print("COUNT : " . count($baseText));
and when I run it, the output is:
Array
(
[1] => jklasdfha;kjdfh ...
[2] => adfgjkafgja ...
[3] => jh ...
[4] => h ...
[5] => sfgsdfgsdfjsfdgadfggfjssdfg ...
[6] => hadfgashahdsahdhhgasdha ...
[7] => 33gasdgasdgasdgasdg ...
)
COUNT : 7
There was more data in the array, but for brevity, I've left it out. It was mostly a series of
me jamming fingers on the keyboard and line breaks.
Is there any reason why print_r can correctly identify all 8 elements of the array and count can
only identify 7?
----
Server IP: 64.71.164.2
Probable Submitter: 192.127.94.7
----
Manual Page -- http://www.php.net/manual/en/function.count.php
Edit -- https://master.php.net/note/edit/75869
Del: integrated -- https://master.php.net/note/delete/75869/integrated
Del: useless -- https://master.php.net/note/delete/75869/useless
Del: bad code -- https://master.php.net/note/delete/75869/bad+code
Del: spam -- https://master.php.net/note/delete/75869/spam
Del: non-english -- https://master.php.net/note/delete/75869/non-english
Del: in docs -- https://master.php.net/note/delete/75869/in+docs
Del: other reasons-- https://master.php.net/note/delete/75869
Reject -- https://master.php.net/note/reject/75869
Search -- https://master.php.net/manage/user-notes.php