I need some help with a variable. I need a way of removing something from the end of it.
The code I'm using right now outputs "var1, var2,". Is there anyway I can remove the ',' from the end of 'var2,'?
What language?
preg_replace/ereg_replace might help you
[editline]07:29PM[/editline]
[quote=efex;17603245]what language?[/quote]
php
[php]trim('var1, ', ' ,');[/php]
or
[php]rtrim('var1, ', ' ,');[/php]
Fixed it, used an x loop to make sure there wasn't an extra comma at the end.