in PHP get the 25th day of the previous month

3

Month I would like to be able to select in my query the 25th day of the month before the present, regardless of whether we are at 2 or 27 in the current month, for example
something like:
Today's day 07/27/2018

<?=$date; ?>

Result of $ date

25/06/2018

e used the query:

$lastday = date('t',strtotime('last month'));

What results in the last day of last month but I want to get the day (25), month (previous to present) and year (present year)

    
asked by claus 27.07.2018 в 23:55
source

1 answer

5

Questions for the previous month with month and year and add the day you want as a previous string in php .

echo "25-".date("m-Y", strtotime("- 1 month"));
    
answered by 28.07.2018 / 00:13
source