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 #176113 is a reply to message #176110] Thu, 24 November 2011 08:55 Go to previous messageGo to previous message
Jonathan Stein is currently offline  Jonathan Stein
Messages: 43
Registered: September 2010
Karma:
Member
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);

Regards

Jonathan
[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: Fri Nov 22 14:47:53 GMT 2024

Total time taken to generate the page: 0.04230 seconds