An exclusive interview with the man behind the twitter bird

twitter-bird-001

You may recall seeing this bird everytime you login through twitter. While it’s not the official logo, it immediately comes to mind when you think of twitter.

The man behind the bird is a Japan-based illustrator named Simon Oxley. His image originally came from iStockPhoto, where he also has dozens of other images that have the same style. For only $7, you are able to freely use the bird in almost any way possible, much like twitter has done. Continue reading

Posted in Interviews | Tagged , , | Leave a comment

Removing Leading Zeros in PHP

It’s pretty easy to do, many thanks to laserlight at phpbuilder:

$var = ltrim($var, '0');

If there’s more than one zero use the following:

$value = 003;
$value = intval($value);
Posted in News | Leave a comment

Convert US states from abbreviations to full name

This is a real time saver just to convert the abbreviation to a full name. I made this function and always use it in my projects. Continue reading

Posted in Code | Tagged , , , | Leave a comment

Convert month name to a number

For the longest time, I’ve always come across this barrier. No pun intended. I wish there was an easier way to convert the month name to a number, but after searching, I came across this thanks to doodlebee from webmasterworld.

Here’s what we have as follows, just copy and paste it and obviously change the month name to whatever month you need and it’ll show up.

function getMonth($m) {
$monthnames = array(
01 => 'January',
02 => 'February',
03 => 'March',
04 => 'April',
05 => 'May',
06 => 'June',
07 => 'July',
08 => 'August',
09 => 'September',
10 => 'October',
11 => 'November',
12 => 'December');

for($i=1;$i<=12;$i++){
$i = sprintf("%02d",$i);
if(date("F", mktime(0, 0, 0, $i, 1, 0)) == $m){
$month_number = $i;
}
}
return $month_number;
}//end function

echo getMonth('March');
echo getMonth('December');

And vice versa

function getMonthNum($m) {
$monthnames = array(
'01' => 'January',
'02' => 'February',
'03' => 'March',
'04' => 'April',
'05' => 'May',
'06' => 'June',
'07' => 'July',
'08' => 'August',
'09' => 'September',
'10' => 'October',
'11' => 'November',
'12' => 'December');

return $monthnames[$m];
}//end function

echo getMonthNum('09');
Posted in Code | Tagged , , , , , | Leave a comment