Jump to content

[SOLVED] Add a character inbetween


briant

Recommended Posts

I'm sure there's a function for this, I just don't know what it is.

 

In the database I have a 13 character number. I want to add a dash after the 3rd number.

 

948-3750279853

 

I tried wordwrap, that kind worked but it added a dash after every 3rd. number_format is a no. I was going to do a substr twice but that's kind of sloppy. There must be a better way.

 

Thanks for any help in advanced.

Link to comment
https://forums.phpfreaks.com/topic/157333-solved-add-a-character-inbetween/
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.