>>848
$string = "abc.def.ghi.";
$string = substr($string,0,strlen($string)-1);