[ create a new paste ] login | about

Link: http://codepad.org/AqHUITGD    [ raw code | output | fork ]

PHP, pasted on Sep 26:
1
2
3
4
5
6
7
8
9
<?php
    $current = date('F');
    for($i = 1 ; $i <= 12; $i++) {
        $month = date("F",mktime(0,0,0,$i,1,date("Y")));
        if( $current == $month )
            echo  $month . " - Selected \r\n";
        else 
            echo $month . "\r\n";
    }


Output:
1
2
3
4
5
6
7
8
9
10
11
12
January
February
March
April
May
June
July
August
September - Selected 
October
November
December


Create a new paste based on this one


Comments: