I have a 7 digit phone number that I want to add a - to after the first 3 digits. I got it working, but there has to be a better and simpler way than this.
$phone = '5551234';
$phone1 = substr($phone,0,3);
$phone2 = substr($phone,3);
$phone = $phone1 . '-' . $phone2;
Thanks,
Chris
$phone = '5551234';
$phone1 = substr($phone,0,3);
$phone2 = substr($phone,3);
$phone = $phone1 . '-' . $phone2;
Thanks,
Chris