How do I remove a comma off the end of a string?

$string = rtrim($string, ',');

Docs for rtrim here

Leave a Comment