I am trying to check a date format to see if I can check the data variable has certain format like MM-DD-YYYY. if not, then exit(). I am not sure how to check the format and wou
you can use regular expressions
if(preg_match("/([0-9]{2})\/([0-9]{2})\/([0-9]{4})/")) { do something }