I assume that I'm passing them in date format.
$datetoget=date("Ymd");
I then call a function:
get_last_day($datetoget);
In my function:
get_last_day($datetoget)
{
$datetoget=($datetoget-1);
}
If I echo $datetoget in the function, I get this output: 2001-01-19, so that's why I assume that $datetoget is in date format. But when I subtract a day (as in my function), all I get is: 2000, not 2001-01-18, like I want.