<?php
$last = (int) date('t');
$d = 1;
do{ echo $d . PHP_EOL; } while($d++ < $last);