FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Phone number formatting
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Phone number formatting [message #176120 is a reply to message #176113] Thu, 24 November 2011 12:27 Go to previous messageGo to previous message
Sandman is currently offline  Sandman
Messages: 32
Registered: August 2011
Karma:
Member
In article <4ece067f$0$293$14726298(at)news(dot)sunsite(dot)dk>,
Jonathan Stein <jstein(at)image(dot)dk> wrote:

> Den 24-11-2011 08:39, Sandman skrev:
>
>> $number = "3051947";
>
> I would do it the "boring" way:
>
> if (strlen($number) > 5) $number = substr_replace($number, ' ', -4, 0);
> $number = substr_replace($number, ' ', -2, 0);

Yeah, I really like to have formats, so I can have different for
different countries and such.





--
Sandman[.net]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: session handler auto log out
Next Topic: Stats comp.lang.php (last 7 days)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 16:54:00 GMT 2024

Total time taken to generate the page: 0.12189 seconds