Jump to content

[SOLVED] stripping out slashes, dashes and parens!


croakingtoad

Recommended Posts

I have a var named $DeveloperTelephone that is being pulled from a database and the string value could be formatted like--

 

540-111-1111

(540) 111-1111

866-111-1111 or 828-111-1111

 

I need to first remove all the dashes and parents and then count the first 10 digits to make that the new value.  So the third value above would become--

 

8661111111

 

How would I accomplish that please and thanks?!

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.