Home / PHP Tips Generated By ChatGPT / Finding the Maximum Value in an Array in PHP Find the highest value in an array using max(). Source Code $values = [2, 3, 1, 6, 7]; echo max($values); // Outputs: 7