I am using $date = date(\"D M d, Y G:i\");.
$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.
$date
I have tr
The date() function already returns a string.
Doing this :
$date = date("D M d, Y G:i");
You'll have the current date in the $date variable, as a string -- no need for any additional operation.