SyntaxFix
Write A Post
Hire A Developer
Questions
have a look at the rtrim function
rtrim ($string , ",");
the above line will remove a char if the last char is a comma