Add a leading zero to months 1-9 for displaying. This makes the number a string.
<?php $month = sprintf("%02s", $month);