title: How to find the last day of the month from date?
body: <p>How can I get the last day of the month in PHP?</p>
  
  <p>Given:</p>
  
  <pre><code>$a_date = "2009-11-23"
  </code></pre>
  
  <p>I want 2009-11-30; and given</p>
  
  <pre><code>$a_date = "2009-12-23"
  </code></pre>
  
  <p>I want 2009-12-31.</p>