Given three integers representing a day, month and year - eg:
13 11 1983
Output the date as dd/mm/yy - i.e., 13/11/83
<? // use the current day as the day to use // the day and month here do have leading zeros when necessary $day = date(d); $month = date(m); $year = date(Y); // this solution is very simple, perhaps i should do some validation here // output the day, month and the last two digits of the year echo $day . '/' . $month . '/' . substr($year, 2, 2); ?>Which produces:
07/11/09