How to find minimum value of an array using PHP

First create an array with some numeric value. Now create a temporary variable $temp in which stored array’s first index’s value i.e 100 and follow below example. You may also like How to find minimum value in array using JavaScript.


foreach($arr as $x)
echo "Minimum value of array = ".$temp;

Leave a Reply

Your email address will not be published. Required fields are marked *