You can the PHP function date() to get the current year.
Syntax
date( format, timestamp);
the format is a required parameter. It specifies the format of returned date and time. the timestamp is an optional parameter.
<?php $year = date('Y'); echo $year; ?>
OUTPUT
2021
0 0Please Login to Post the answer