Splitting up a phone number in php

Sqs

New Member
Ok so i have a variable $phone which contains the string (407)888-9999 and I have this code\[code\] if($phone != ''){ $phone = "<span id='telephone'>{$phone}</span>";}return $phone;\[/code\]This works fine but now the client wants to have a some padding in between the area code and the next three numbers. So i need the code to be like this \[code\]<span id='telephone'><span class='spacer'>(407)</span>888-9999</span>";\[/code\]
 
Back
Top