You are here

function format_be_phone_number in Phone 7

Same name and namespace in other branches
  1. 6 phone.be.inc \format_be_phone_number()

Formatting for Belgian Phone Numbers.

Parameters

string $phonenumber:

Return value

string Returns a string containting the phone number with some formatting.

File

include/phone.be.inc, line 37
CCK Field for Belgian phone numbers.

Code

function format_be_phone_number($phonenumber, $field) {
  $phonenumber = trim($phonenumber);
  if ($field['phone_country_code']) {
    if ($matches[1] != "+32") {
      $phonenumber = "+32" . " " . $phonenumber;
    }
  }
  return $phonenumber;
}