You are here

function format_be_phone_number in Phone 6

Same name and namespace in other branches
  1. 7 include/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

./phone.be.inc, line 38
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;
}