/ Published in: PHP
Expand |
Embed | Plain Text
<?php /** * Strip a Phone number of all non alphanumeric characters */ $phone = "+1(555)-555-1212"; print $phone; // Result: 15555551212 ?>
Comments
Subscribe to comments
You need to login to post a comment.

What if the phone number contains an extension? e.g. +1 (555) 555-1212 ext. 228