Formatting 'Y-m-d H:i:s' with strtotime
<p>I want to format <code>$datetime = date('Y-m-d H:i:s');</code> to <code>$time</code> using <code>strtotime($datetime)</code> for display like <code>2016-01-20 11:16:31</code> But it does not work. How do I fix that?</p>

<p><strong>CODE</strong></p>

<pre><code>$datetime = date('Y-m-d H:i:s'); 
$time = strtotime($datetime); 
echo $time; 
echo $datetime;
</code></pre>

<p><strong>My code given output like this :</strong></p>

<pre><code>1453263391 // $time
2016-01-20 11:16:31 // $datetime
</code></pre>