Jump to content

delete comma


sandy1028

Recommended Posts

What does the preg_replace have to do with this?  Your sample code isn't even valid.

 

Trim will let you trim any arbitrary character you want, if you use the 2nd parameter, so ...

 

 

$match = trim($match, ',');

 

Will remove a trailing comma no problem.

Link to comment
https://forums.phpfreaks.com/topic/177503-delete-comma/#findComment-935893
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.