if the count is equal to k and the previous element is not equal to this element
if ( $ count == $ k && ( $ i == 0 || ( $ arr [ $ i - 1 ] != $ arr [ $ i ] ) ) ) { echo ( $ arr [ $ i ] ) ; echo ( " STRNEWLINE " ) ; return ; } }