Input
Output
<?php // Define an array $numbers = array(45, 12, 78, 5, 89, 23, 67); // Initialize min with the first element $min = $numbers[0]; // Traverse the array to find the minimum for ($i = 1; $i < count($numbers); $i++) { if ($numbers[$i] < $min) { $min = $numbers[$i]; } } // Display the minimum element echo "The minimum element in the array is: $min"; ?>