PHP Array Length: Quick Guide
In PHP, you can use the count() function to retrieve the length of an array. For example:
$myArray = array(1, 2, 3, 4, 5);
$length = count($myArray);
echo "数组的长度是:" . $length;
The code above will output:
数组的长度是:5