title: Calculate passed time with PHP
body: <p>I got the time difference between dates like this : </p>
  
  <pre><code>$time1 = "2013-02-25 12:00:00";
  $time2 = "2013-01-01 12:00:00";
  $tdiff = strtotime($time1) - strtotime($time2);
  </code></pre>
  
  <p>I want extract days, hours and minutes from <code>$tdiff</code>. Output should like : <code>35 days 6 hours 14 minutes</code></p>
  
  <p>I really searched and try to do something by myself. But I can't get true value. </p>
  
  <p>---- EDIT ---- 
  I can found date diff. I want extract days, hours, minutes from calculated time... </p>
  
  <p>---- EDIT 2 ----
  Here is my complete mysql code</p>
  
  <pre><code>select (
      select avg(UNIX_TIMESTAMP(tarih)) from table1 
      where action in (6) and who = '".$user."' and dates between '".$date1."' and '".$date."'
      ) - ( 
      select avg(UNIX_TIMESTAMP(tarih_saat)) from table2 
      where action in (6) and active = 1 and dates between '".$date1."' and '".$date2."
  )
  </code></pre>
  
  <p>This query returns to me true value of time. This query is working correctly for me. Result is like : <code>215922</code>. result type of  UNIX_TIMESTAPM. So I want to learn how many days, hours and minutes in this timestamp. </p>