php - String date current date/time? -
i using $date = date("d m d, y g:i");
.
when echo $date
, shows correct date/time. need string.
i have tried string($date)
; nothing happens here. and
$today = strtotime($date);
here weird numbers..
i need string can put $today
in message.
what correct method this?
the date()
function returns string.
doing :
$date = date("d m d, y g:i");
you'll have current date in $date
variable, string -- no need additional operation.
Comments
Post a Comment