Trying to automate some things with a php script, like duplicating table (structure only) and name it with 'tablename_09' for this year, tablename_10 for next year and so on.
Got the part done where I define the year, but how to shorten it to _"last two numbers of year"
Code: Select all
<?php
define('CURRENT_YEAR', date('Y'));
define('PREVIOUS_YEAR', date('Y') - 1 );
define('PRE_PREVIOUS_YEAR', date('Y') - 2 );
define('NEXT_YEAR',date('Y') + 1 );
function listYears() {
echo 'Twee jaar geleden was '.PRE_PREVIOUS_YEAR.'<br />';
echo 'Vorig Jaar was '.PREVIOUS_YEAR.'<br />';
echo 'Huidige Jaar is '.CURRENT_YEAR.'<br />';
echo 'Volgend jaar is '.NEXT_YEAR.'<br />';
}
listYears();
?>Thanks already..