note 75869 rejected from function.count by nlopess

From: Date: Tue, 19 Jun 2007 22:00:43 +0000
Subject: note 75869 rejected from function.count by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127802@lists.php.net to get a copy of this message
Note Submitter: kodra22 at gmail dot com ---- 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?

« previous php.notes (#127802) next »