PHP sizeof() Function
The sizeof() function is used to count the elements of an array or the properties of an object. This function is an alias of count().
The sizeof() function is an alias of the count() function.
Returns the number of elements in the array
Parameter | Description |
---|---|
array | Required. Specifies the array |
mode | Optional. Specifies the mode. Possible values: |
Syntax
sizeof(array,mode);
Example
$name=array("Alex","Prince","Samule");
echo sizeof($name);
Output
3
Leave a Reply