I want to be able to compare an input of $date, which is a string, with a value from the database with the type of "datetime". Here's my code below. It outputs as a string type instead of the desired datetime type. Can you please help me out?
<?php
$string="2013-04-19 14:08:10";
$timestamp = strtotime($string);
$date = date("Y-m-d H:i:s", $timestamp);
?>
<?php var_dump($date);?>
this is the output
string '2013-04-19 14:08:10' (length=19)
Thanks so much for your help.