Getting the area code from a Swedish phone number using PHP

Hi!

Currently I am working on a little project where I need to fetch the area code form a phone number for Sweden. This, however, is not one of my strongest sides… I really hate Regex.
Since this is an iOS project, I would like some objective-C code… so I jumped over to one of the greatest sites I know and made a post: http://stackoverflow.com/questions/8188964/getting-an-areacode-from-the-phone-number

I got a great answer, which I approved, and made a test script in PHP. This is me sharing this test script. If you can use it, have fun with it but, Do not forget to Like the post and Flattr it ๐Ÿ˜‰

Posted in Development, Free stuff, iPhone, PHP, Web Tagged with: , , , , , ,
3 comments on “Getting the area code from a Swedish phone number using PHP
  1. ellis says:

    w00t?! What do you mean by “I really hate PHP”? It’s basically your programmer nationality! You wouldn’t say you hate the Netherlands? ๐Ÿ˜›

    Anyways, have you looked at PHP5.3 and the upcoming PHP6? Combined with the awesome work done on Symfony2 at http://www.symfony.com? The symfony crew is basically re-shaping the entire PHP ecosystem.

  2. Paul Peelen says:

    Dude, I think you commented the wrong post ๐Ÿ˜‰

    I donโ€™t know how I thought when I wrote it since I code PHP basically daily. However, I hate Regexโ€ฆ thats what I must have ment at that late hour. Cause, I really do hate Regex.
    However, I moved your post. I havn’t looked at symfony. I might will, later on.

  3. ellis says:

    Ahh, yes, Regexp. You are allowed to hate Regexp. ๐Ÿ˜›

Leave a Reply

Your email address will not be published. Required fields are marked *

*

 

Categories