Been out of the game a little while, my apologies. I know there isn’t much I can do to make it up to you (my fans); however, I’ll give you this in hopes of trying to win you back.

Format phone function using PHP:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function format_phone($country, $phone) {
$function = 'format_phone_' . $country;
if(function_exists($function)) {
return $function($phone);
}
return $phone;
}

function format_phone_us($phone) {
// note: making sure we have something
if(!isset($phone{3})) { return ''; }
// note: strip out everything but numbers
$phone = preg_replace("/[^0-9]/", "", $phone);
$length = strlen($phone);
switch($length) {
case 7:
return preg_replace("/([0-9]{3})([0-9]{4})/", "$1-$2", $phone);
break;
case 10:
return preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "($1) $2-$3", $phone);
break;
case 11:
return preg_replace("/([0-9{1})([0-9]{3})([0-9]{3})([0-9]{4})/", "$1($2) $3-$4", $phone);
break;
default:
return $phone;
break;
}
}

// usage
$phone = '111 111 1111';
$phone = format_phone('us', $phone);
echo $phone;


CONTINUE READING


10 Browser Testing Tools

I’ve been doing a lot of Quality Assurance for my #1 Client, and in addition to being fully thorough, it’s good to have a bunch of tools under your belt. Rather than re-blog about it, I’ll share with you a blog about 10 Browser Testing Tools. He says they’re for designers, I say they’re for anyone that works with the web. You can be a Developer, Designer, Quality Assurance Engineer or even a Project Manager – these tools are for you!

Visit Source

Ever have that annoying dotted outline around your flash or image? You know, the one around your anchor links that you ignore most of the time…ever have someone tell you to take it off and not know how?

It happens to the best of us. It’s the annoying dotted outline (dotted line) that we don’t even think about until we have to launch a product.

What does the dotted outline look like?

Just so we’re clear about what the dotted outline looks like, here’s an example:

Dotted Outline

The Solution

And now, here’s how you’re going to get rid of it for your flash piece:

1
2
3
object {
outline: none;
}


CONTINUE READING