The only thing I can think of off the top of my head is to use substr.
$old_phone = "1234567890";
$area_code = substr($old_phone,0,3);
$prefix = substr($old_phone,3,3);
$suffix = substr($old_phone,6,4);
$new_phone = "($area_code) $prefix-$suffix";
I know there is a better way of doing it though.