Skip to content

Instantly share code, notes, and snippets.

@xenioushk
Created October 30, 2023 08:19
Show Gist options
  • Select an option

  • Save xenioushk/2341f983e761b4ae6a403edbf50e33bd to your computer and use it in GitHub Desktop.

Select an option

Save xenioushk/2341f983e761b4ae6a403edbf50e33bd to your computer and use it in GitHub Desktop.
<?php
/*
* Get Max and Min Value
* From A PHP Array
* https://youtube.com/bluewindlab
*/
$items = [10, 2, 31, 14, 5];
$maxVal = max($items);
echo "Max Value: " . $maxVal;
echo "<br>";
$minVal = min($items);
echo "Min Value: " . $minVal;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment