Program to find the minimum ( or maximum ) element of an array | PHP program to find minimum ( or maximum ) element in an array . ; Driver Code
< ? php function getMin ( & $ arr , $ n ) { return min ( $ arr ) ; } function getMax ( & $ arr , $ n ) { return max ( $ arr ) ; } $ arr = array ( 12 , 1234 , 45 , 67 , 1 ) ; $ n = sizeof ( $ arr ) ; echo " Minimum ▁ element ▁ of ▁ array : ▁ " . getMin ( $ arr , $ n ) . " STRNEWLINE " ; echo " Maximum ▁ element ▁ of ▁ array : ▁ " . getMax ( $ arr , $ n ) ; ? >