Check whether current character is adjacent to previous character ( character processed in parent call ) or not .
function isadjacent ( $ prev , $ curr ) { return ( ( ord ( $ curr ) - ord ( $ prev ) ) == 1 ) ; }