I am using $date = date(\"D M d, Y G:i\");
.
When I echo $date
, it shows the correct date/time. Now I need this as an string.
I have tr
Your $date
variable is a string, there's no need for any conversion.
You can have a look at the documentation: http://ch.php.net/manual/en/function.date.php. The return value of the date()
function is string.
The strange numbers you see when you call strtotime()
is the Unix timestamp which represents the number of seconds elapsed since January 1 1970 00:00:00 UTC.