Negating one time from another
<p>Hey guys i'm trying to figure out how to subtract one time from another using php to get the amount of time left between the two times. So for example</p>

<p>time left = time1-time2</p>

<p>or</p>

<p>timeleft = 15:35-15:30</p>

<p>which would be equal to 5mins left.</p>

<p>Currently I am loading the two times like so.</p>

<p>time1 is coming from my database (which is the time we are waiting for, and in my case the time we are waiting for is the time for next update) and time2 is the current system time.</p>

<p>I tried using this code</p>

<pre><code>$timeleft = $dbtime - $curtime;
</code></pre>

<p>$dbtime = time loaded from database.
$curtime = current system time.</p>

<p>But that just returns a 0.</p>

<p>Any help is appreciated thanks.</p>
