Horje
php max Code Example
php max
echo max(2, 3, 1, 6, 7);  // 7
echo max(array(2, 4, 5)); // 5
find largest element of an array in php
<?php 
$array = array(5,7,81,0,12);

$max1 =0 ;
$max2 = 0;

for($i=0; $i $max1)
    {
      $max2 = $max1;
      $max1 = $array[$i];
    }
    else if($array[$i] > $max2)
    {
      $max2 = $array[$i];
    }
}
echo "Maximum value = ".$max1;
echo "
"; 
echo "Second maximum Value =".$max2;
?> 




Php

Related
how to check if page opened from mobile or desktop Code Example how to check if page opened from mobile or desktop Code Example
get post id contact form 7 Code Example get post id contact form 7 Code Example
yii2 OAuth2 Code Example yii2 OAuth2 Code Example
substr last 3 characters Code Example substr last 3 characters Code Example
php get function from different file Code Example php get function from different file Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7