Ask Your Question
4

What does the error message "Parameter must be an array or an object" mean in PHP 7.2's count() function?

asked 2023-05-08 14:17:30 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-05-08 14:21:01 +0000

ladyg gravatar image

The error message "Parameter must be an array or an object" in PHP 7.2's count() function means that the parameter passed to the count() function must be either an array or an object. If the parameter is not an array or an object, the count() function cannot determine the number of elements in the parameter and throws this error message.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-08 14:17:30 +0000

Seen: 12 times

Last updated: May 08 '23