Not that I have a problem with it but just wondering why you chose to use the string index here vs substr?

`$lch = substr($data,-1);`