I want to remove the comma off the end of a string. As it is now i am using
$string = substr($string,0,-1);
but that only removes the last
A simple regular expression would work
$string = preg_replace("/,$/", "", $string)