If arr [ i ] is in between first and second then update second
else if ( $ arr [ $ i ] > $ second && $ arr [ $ i ] != $ first ) $ second = $ arr [ $ i ] ; } if ( $ second == PHP_INT_MIN ) echo ( " There ▁ is ▁ no ▁ second ▁ largest ▁ element STRNEWLINE " ) ; else echo ( " The ▁ second ▁ largest ▁ element ▁ is ▁ " . $ second . " STRNEWLINE " ) ; }