<?php function dateSuffix(int $day): string { return [ 1 => 'st', 2 => 'nd', 3 => 'rd', 21 => 'st', 22 => 'nd', 23 => 'rd', 31 => 'st' ][$day] ?? 'th'; } echo "4" . dateSuffix(4);
You have javascript disabled. You will not be able to edit any code.