Viewing 1 to 2 of 2 items
Archive | PHP RSS feed for this section

Php – Remove the last character from string

I have a string like a,b,c,d,e, I would like to remove last ',' and get the remaining string back OUTPUT: a,b,c,d,e Here is what i did  echo rtrim("a,b,c,d,e,", ",")   Hope it helps ^^