Ajax
ASP
C,C++
C#,.NET
CSS,HTML
Delphi,Kylix
Experience
Flash
Java
JavaScript
PHP
Python
QT
SQL
ShellScript
VB
U :
P :
Register
Lost Password
Other Links
Code Archive
Save Giovanni
PHP Category Code
Real Name
:
Erden
Subject
:
Tel numarası gösterimi
Description
:
fonksiyondan girilen tel numarasını ulaslar arası yazım standartında döndürür.
<?php function formatPhoneNumber($strPhone) { $strPhone = ereg_replace("[^0-9]",'', $strPhone); 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); } echo formatPhoneNumber('2243903940'); //(224) 390-3940 ?>
Rating
:
3.00
(out of 5)
Visitor Voting Booth
:
Excellent
Very Good
Good
Fair
Poor
Copyright © 2006 SharingCode.NET . All rights reserved. Hosted By: SisNetworks