i believe the "[1]" serves no purpose, you should take it out.
It's vital for the formatting that the OP wanted... I forgot PHP doesn't like array syntax on anything other than variables, though. substr() can be used instead.
Why would date be an array?
It's not, it's a string. Array syntax can be used to access specific characters in strings.
Code:
$ystr = date('y');
$mstr = date('n') - 3;
if($mstr < 1) {
$mstr += 12;
$ystr -= 1;
}
$tma = mktime(date('G'), date('i'), date('s'), $mstr, date('j'), $ystr);
$tstr = substr(date('y', $tma), -1, 1) . date('m', $tma);
Bookmarks