How am I able to get the value of the previous year using PHP. Are there any predefined functions for it?
This thread needs an update.
Nowadays you would use the PHP date-time object and do something like this:
$lastYear = new DateTime(); $lastYear->sub(new DateInterval('P1Y')); echo $lastYear->format('Y');