PHP remove last character from string [duplicate]

Posted: February 27, 2013 in PHP
Tags: ,

rtrim($string, ",") would cut trailing commas.

trim($string, ",") would cut trailing and prefixing commas.

Leave a comment