Created
January 14, 2012 17:29
-
-
Save JamesChevalier/1612186 to your computer and use it in GitHub Desktop.
Reformat phone number so Twilio speaks it properly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$CallFrom = $_REQUEST['From']; // Take the phone number that is calling this app | |
$CallFrom = substr($CallFrom, 2); // Take the country code (+1, for example) off the front of the number | |
$CallFrom = chunk_split($CallFrom,1,","); // Insert a comma between each digit | |
echo $CallFrom; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment