__adrian: how? I want to set the validate format dd/mm/yyyy how can i easily do that without regex?
IF it's a dob for someone who is expected to be alive, then also check that it is a date between now and (e.g.) a hundred years ago a) why does the format matter? b) split on "/" and then validate each segment but I would recommend using DateTime
__adrian: thanks, i will read it now... what i found is that file() brings a new line (a0 in binary) to my string...
_adrian, i am trying to test the $_post dob $_post['DOB'] should match the regex or format dd/mm/yyyy
colacola: 636f6c61636f6c61, and colacola+\n: 636f6c61636f6c610a
Sagar: just pass it to DateTime
likecolacola http://php.net/file read about $flags