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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -