i need date in 6 digits ie 01.01.02
using this getdate() it reads 1.1.2002
$today = getdate(); $mday = $today['mday']; $mon = $today['mon']; $year = $today['year']; $date = "$mday.$mon.$year"; echo"$date";
how can i sort this out!?
You could do it with getdate() and printf(), but it would be far simpler to use date() and a format string.
echo date('d.m.y');