You are here

function format_el_phone_number in Phone 7

Same name and namespace in other branches
  1. 6 phone.el.inc \format_el_phone_number()

Formatting for Greek Phone Numbers.

Parameters

string $phonenumber:

Return value

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

File

include/phone.el.inc, line 35
CCK Field for Greek phone numbers.

Code

function format_el_phone_number($phonenumber, $field) {

  //$phonenumber = trim($phonenumber);

  // do some formatting on the phone number
  $phonenumber = str_replace("[ -]", "", $phonenumber);
  if ($field['phone_country_code']) {
    if ($matches[1] != "+30") {
      $phonenumber = "+30" . " " . $phonenumber;
    }
  }
  return $phonenumber;
}