Home / PHP Tips Generated By ChatGPT / Finding the Length of an Array in PHP Use count() to find out how many elements are in an array. Source Code $fruits = ['Apple', 'Banana', 'Cherry']; echo "There are " . count($fruits) . " fruits in the array.";