I have a variable with the following value
$month = 201002;
the first 4 numbers represent the year, and the last 2 numbers represent the m
$mydate = "201002"; date('M', mktime(0, 0, 0, substr($mydate, 4, 2), 1, 2000));