Jump to: navigation, search

Php max

From w3cyberlearnings

Contents

PHP function max

This function returns the largest number of the two input numbers.

Syntax max

  • number1: first number.
  • number2: second number.
max(number1, number2);

Example 1

<?php 
 $large1 = max(7,30);
 echo $large1;
 echo "<br/>";

 $large2 = max(-3,-50);
 echo $large2;
 echo "<br/>";
?>

Output

30
-3

Related Links


Navigation
Web
SQL
MISC
References