Ans:
There are two ways:
1) sizeof($myarray) - This function is an alias of count()
2) count($array) - This function returns the number of elements in an array.
Note
if you just pass a simple variable instead of an array, count() will return 1.
Post new comment