Php Check is date or not

This Function check if the given string is date type or not!!.


And Return True or false according to the result.


function isDate($string ='')
{
        DateTime::createFromFormat('Y-m-d', $string) !== FALSE ?  return true  : return false;
}

Comments

Popular posts from this blog

SKILL ROCKS TECH QUESTIONS

C Program for Analog Clock Design