in reply to Re: String matching problemin thread String matching problem
substr($string, -1) will return the last character in $string.