PHP max() Function Example

PHP max() Function Example


Posted in : PHP Posted on : January 31, 2011 at 5:58 PM Comments : [ 0 ]

The max() function is use to check the highest number between two specified numbers.

PHP max() Function Example:

The max() function is use to check the highest number between two specified numbers.

Syntax:

max(a, b)

where a and b is two numbers for process.

Example:

<?php
echo "The maximum number in between (2, 10) is :" . (max(2,10) . "<br />");
echo "The maximum number in between (-.3, -.4) is :" . (max(-.3,-.4));
?> 

Output:

The maximum number in between (2, 10) is :10
The maximum number in between (-.3, -.4) is : -0.3

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics