Javatpoint Logo
Javatpoint Logo

PHP Max() Function

The max() function is used to find the highest value.

Syntax:

OR

Name Description Required/Optional
array_values Specifies an array containing the values Required
value1,value2,value3,value4... Specifies the values to compare (must be at least two values Required
PHP math Max function

Example1

Output:

Your number is =max(4,14,3,5,14.2)
By using max function Your number is : 14.2

Example2

Output:

Your number is =max(.1, .001, .2, -.5)
By using max function Your number is : 0.2

Example3

Output:

Your number is =array(110, 20, 52 ,105, 56, 89, 96)
By using max() function Your number is : 110

Example4

Output:

By using max() function Your number is : 200

Next TopicPHP Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA