I am trying to add the value contained in a variable to a date, and that the result is another date.
$hoy = $now->format('d/m/Y');
$dias = 36;
$ newDate would be the result of adding to today's date the days that the variable contains. I have found ways to do it but with a fixed number not with variables, that is to say this:
$now->add(new \DateInterval('P36D'));
But it does not work for me.