$recipients = 'jim@xxxxxxxxx,pat@xxxxxxxxx,kevin@xxxxxxxxx,'; echo str_replace(',', ', ', substr($recipients, 0, -1)); ----- Original Message ----- From: "Ross" <ross@xxxxxxxxxxxxx> > I have a large group of email addesses serperated by commas. I need to trim > off the very last comma > > $recipients = jim@xxxxxxxxx,pat@xxxxxxxxx,kevin@xxxxxxxxx, > > > Also how would I add a space after every comma? to give > > jim@xxxxxxxxx, pat@xxxxxxxxx, kevin@xxxxxxxxx > > > many thanks, > > Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php