title: Is this the proper way to get the end of day in PHP?
body: <p>I'm getting the End Of Day like this: </p>
  
  <pre><code>function endofday($date_to_change)
  {
    $date_to_change = date('Y-m-d');
    $date_to_change = date('Y-m-d H:i:s', strtotime("+23 hours 59 minutes  59 seconds", strtotime($date_to_change)));
    return date("Y-m-d H:i:s", $date_to_change);
  }
  </code></pre>
  
  <p>It works but is this the proper and most efficient way to get 23:59:59 from a date? My goal is to select rows from a mysql database between 00:00:00 and 23:59:59 from a date passed in with or without time.</p>