Now print the largest twin in range
for ( $ i = $ high ; $ i >= $ low ; $ i -- ) { if ( $ prime [ $ i ] && ( $ i - 2 >= $ low && $ prime [ $ i - 2 ] == true ) ) { echo " Largest ▁ twins ▁ in ▁ given ▁ range : ▁ ( " , $ i - 2 , " , ▁ " , $ i , " ) " ; $ twin = true ; break ; } } if ( $ twin == false ) echo " No ▁ such ▁ pair ▁ exists " ; }