If element exist than return the pair
if ( array_search ( $ val , $ s ) ) { echo " Pair ▁ elements ▁ are ▁ " . $ arr [ $ i ] . " ▁ and ▁ " . $ val . " STRNEWLINE " ; return true ; } array_push ( $ s , $ arr [ $ i ] ) ; } return false ; }