print current date and time in php in dd mm yyyy format code example Example: php date format dd/mm/yyyy date("d/m/Y", strtotime($str));