lional Posted November 21, 2006 Share Posted November 21, 2006 Hi AllJust a quick question.I know it is possible to add formating to a telephone number, number but is it possible to remove formatting. I would like to take a number for example (011)555-5555 and change it to 115555555.is this possibleThanksLional Link to comment https://forums.phpfreaks.com/topic/27995-removing-formatting-from-a-number/ Share on other sites More sharing options...
kenrbnsn Posted November 21, 2006 Share Posted November 21, 2006 Use [url=http://www.php.net/str_replace]str_replace()[/url][code]<?php$str = '(011)555-5555';$str = str_replace(array('(',')','-'),'',$str);?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/27995-removing-formatting-from-a-number/#findComment-128044 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.