title: PHP: date "Yesterday", "Today"
body: <p>I have a little function that shows latest activity, it grab timestamp in unix format from the db, and then it echo out with this line:</p>
  
  <pre><code> date("G:i:s j M -Y", $last_access)
  </code></pre>
  
  <p>Now i would like to replace the date (j M -Y) to Yesterday, and Today if the latest activity was within today, and same goes with Yesterday.</p>
  
  <p>How can i do this?</p>