i cant get this to work. I want to enter a date in d/m/Y and add it days and get the result in d/m/y too but apparently php takes the original input of the date as m/d/Y anyways
<?php
$ymd = DateTime::createFromFormat('d/m/Y', '01/04/2018')-
>format('d/m/Y');
echo date('d/m/Y', strtotime($ymd. ' + 5 days'));
The output is 09/01/2018 but it is actually taking the 04 in the date input as days when it is the month. The result should be 06/04/2018. How can i get this to work? I tried everything. Thanks.