How to use max in PHP

This article describe about max() function in PHP.
  • 1370

max() function

This function return the maximum number from define two number.

Syntax

max( x, y)

 

Parameter Description
x Specified a number.
y Specified a number.

Example

<html>
<?php
echo(max(9,7) . "<br />");
echo(max(-6,5) . "<br />");
echo(max(-3,-5) . "<br />");
echo(max(9.5,7.300))
?>
</html>

 

Output


maxphp.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.