- date: documentation ( source)
- range: documentation ( source)
- sprintf: documentation ( source)
<?php
$currentDate = date('y-n');
foreach (range(15, 30) as $year) {
foreach (range(1, 12) as $month) {
$cardDate = sprintf('%s-%s', $year, $month);
echo $currentDate .' ?= ' . $cardDate . ' = '. ($currentDate > $cardDate) . PHP_EOL;
}
}