If an array has only one element, the count result will be 1. If the array is uncountable, the result is also 1. So, How to know it’s one element or uncountable?
Edit
php menue: If var is not an array or an object with implemented Countable interface, 1 will be returned.
If an array has only one element, the count result will be 1. If
Share
From PHP manual: http://www.php.net/manual/en/function.count.php
you could try this,
This should work with arrays, objects and simple variables.