I want to check the date string whether it is format d/m/Y. For eg. 23/07/2017.
how can I check as I required a condition in string. I am doing this.
echo $explode[2];
echo date('d/m/Y', strtotime($explode[2]));
if (($explode[2] == date('d/m/Y', strtotime(trim($explode[2]))))) {
echo "date format";
} else {
echo "error";
}