PHP does not have a way to format phone numbers, you would need to hand code a function to do that.
here is a quick example I found through google:
<?php
function phoneFormat($phoneNumber) {
$strPhone = ereg_replace("[^0-9]",'', $phoneNumber);
if (strlen($strPhone) != 10) {
return $strPhone;
}
$strArea = substr($strPhone, 0, 3);
$strPrefix = substr($strPhone, 3, 3);
$strNumber = substr($strPhone, 6, 4);
$strPhone = "".$strArea."-".$strPrefix."-".$strNumber;
return ($strPhone);
}
?>
to use this function, change your code:
<?php echo phn_num($row_WADAroster['phone']); ?>
<?php echo phn_num($row_WADAroster['fax']); ?>
to:
<?php echo(phoneFormat($row_WADAroster['phone'])); ?>
<?php echo(phoneFormat($row_WADAroster['fax'])); ?>