note 30145 added to function.array-count-values

From: Date: Fri, 07 Mar 2003 22:49:16 +0000
Subject: note 30145 added to function.array-count-values
Groups: php.notes 
Request: Send a blank email to php-notes+get-44989@lists.php.net to get a copy of this message
You'll get an error, if you want to count the elements of an array of objects with array_count_values. $users=array( array("a","a@b"), array("b","b@b"), array("c","c@c")); --> Warning: Can only count STRING and INTEGER values! solution: print sizeof($users); --> 3 -- http://www.php.net/manual/en/function.array-count-values.php http://master.php.net/manage/user-notes.php?action=edit+30145 http://master.php.net/manage/user-notes.php?action=delete+30145 http://master.php.net/manage/user-notes.php?action=reject+30145

« previous php.notes (#44989) next »