Possible duplicate:Return variable with highest value?
I am trying to find an easy way to find the highest number of 3 variables.
$1 = 100 $2 = 300 $3 = 200
of these three variables, I want to set the new variable as the highest ($ 2)
So:
$highest_number = 300
$highest_number = max($1, $2, $3);
OR
$values = array($1, $2, $3); $highest_number = max($values);
Further information can be found in quickref for max
Source: https://habr.com/ru/post/1527527/More articles:Ask the dispatcher to send a response without a Content-Type header - ruby-on-railsWhich loops should be parallelized, external or internal - c ++Xcode Toolkit Generation - iosGet variable name with highest number from Python 3.3.4 list - pythonlatex () in sympy. How to get \ frac, not \\ Frac - pythonHow to convert String to Drawable - androidWhat is the correct way to use the android.text.format.DateFormat.format method - androidjQuery selector all identifiers that are integers - javascriptSVG height element not dynamic? - htmlConvert integer to null binary string - javaAll Articles