note 29721 deleted from function.array-count-values by didou

From: Date: Sun, 18 May 2003 01:33:15 +0000
Subject: note 29721 deleted from function.array-count-values by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48322@lists.php.net to get a copy of this message
Note Submitter: heygrady@hotmail.com ---- --This does not works with objects. If you have an array --filled with objects, you can not count them. I was recieveing the same error but i did not realize it until i turned on the "display_errors = " in the php.ini to "on". The funny thing is that the function was working as i expected it to and it was correctly counting my array values even after I turned on "display_errors = on". It was displaying that nasty "Warning: Can only count STRING and INTEGER values..." message but it was counting my array anyway. I experienced this behavior using PHP 4.2.1 and PHP 4.3.1 using Apache 2.0.4x and Windows XP. I am using the feature to count the comments i recieve on my personal blog at http://www.blodge.cjb.net and it has been working fine. I also did not have much luck with the suggestion to use "serialize()" but i am not familiar with that function.

« previous php.notes (#48322) next »