What is the function to count the elements of an array in PHP?
To count the elements of an array in PHP, you can use the `count()` function. This function returns the number of elements in an array. It is a simple and efficient way to get the size of an array without having to manually iterate through it.
// Example array
$array = [1, 2, 3, 4, 5];
// Count the elements of the array
$count = count($array);
echo $count; // Output: 5