title: Get the last day of the last month and the first day of next month in PHP
body: <p>If i have for example :</p>
  
  <blockquote>
    <p>'2020-01-01'</p>
  </blockquote>
  
  <p>I want to have two dates :</p>
  
  <p>-The last day of the prévious month : </p>
  
  <blockquote>
    <p>'2019-12-31'</p>
  </blockquote>
  
  <p>-The first day of next month :</p>
  
  <blockquote>
    <p>'2020-02-01'</p>
  </blockquote>
  
  <p>I tried to use something like <code>echo date("Y-n-31", strtotime('2020-01-01'));</code> but i don't know.</p>
  
  <p>Thank you.</p>