I am facing an issue in echo date() with some formats like:
if i use the format d/m/Y like: '18/04/2017' then date() does not recognize this because the format contain /
<?php
echo date("d-m-Y",strtotime('16/04/2017'));
?>
it will output: 01-01-1970
But when i use the format m/d/Y like: '04/18/2017' then date() it recognized
<?php
echo date("d-m-Y",strtotime('04/16/2017'));
?>
it will output: 16-04-2017
I am not getting these different behaviour of date(), can anybody help me please