What function can be used to determine the number of elements in an array in PHP?

To determine the number of elements in an array in PHP, you can use the `count()` function. This function will return the number of elements in the array, including nested arrays. It is a simple and efficient way to get the size of an array in PHP.

$array = [1, 2, 3, 4, 5];
$size = count($array);
echo "The number of elements in the array is: " . $size;