php data difference giving fatal error
<p>i have one date value coming from database and i want to calculate difference between today date and that database date.</p>

<p>the dates coming from database is</p>

<pre><code>2012-06-11 18:20:40
</code></pre>

<p>i use this code to see values</p>

<pre><code>    echo date('Y-m-d H:i:s');
    echo $result['dt_pub_date'];
</code></pre>

<p>i have written this code</p>

<pre><code>$val=date('Y-m-d H:i:s') -&gt;diff($result['dt_pub_date']);
</code></pre>

<p>but getting this error</p>

<pre><code>Fatal error: Call to a member function diff() on a non-object in.....
</code></pre>

<p>Thanks</p>
