A
Anonymous
Guest
hi
i cannot understand ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) in this scripte ,
can anyone guide me?
i cannot understand ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) in this scripte ,
can anyone guide me?
Code:
<?php
if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) {
echo "$regs[3].$regs[2].$regs[1]";
} else {
echo "Invalid date format: $date";
}
?>