In this post I will show how to get best two out of Three Numbers using PHP, Actually I have developed CBSE based School ERP for Our company and for generating Result tabulation you need to find out best two numbers from T1,T2 and T3. Lets dive into code without wasting time ..
Script / Code to find out best two out of Three Numbers
<?php /* * Getting Best two of Three Numbers * By Sanjay Prasad */ $fd1=10; $fd2=11.5; $fd3=8.5; $num1=number_format($fd1,1); $num2=number_format($fd2,1); $num3=number_format($fd3,1); $num=array($num1,$num2,$num3); rsort($num); //var_dump($num); $fd4 = $num[0] + $num[1]; echo $fd4; //output will be 21.5 ?>