んじゃヒントを

for ($i = 1; $i <= 50; $i++) {
printf("%02d ", $i);
if ($i % 5 == 0) {
echo "<br>\n";
}
}