studentofstone Posted January 5, 2011 Share Posted January 5, 2011 I am getting syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on the date stamp line below but I can't see what is causing the problem. when I comment it out the problem goes away so I know I it is there. please help. $email_message = "Form details below.\n\n"; $email_message = date("m/d/Y")"\n"; Link to comment https://forums.phpfreaks.com/topic/223532-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-date-stamp/ Share on other sites More sharing options...
btherl Posted January 5, 2011 Share Posted January 5, 2011 $email_message = date("m/d/Y") . "\n"; Or $email_message = date("m/d/Y\n"); Link to comment https://forums.phpfreaks.com/topic/223532-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-date-stamp/#findComment-1155447 Share on other sites More sharing options...
desjardins2010 Posted January 5, 2011 Share Posted January 5, 2011 try date('H:m:s \m \i\s\ \m\o\n\t\h'); Link to comment https://forums.phpfreaks.com/topic/223532-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-date-stamp/#findComment-1155448 Share on other sites More sharing options...
studentofstone Posted January 6, 2011 Author Share Posted January 6, 2011 yes thank you btherl. Well done! Link to comment https://forums.phpfreaks.com/topic/223532-parse-error-syntax-error-unexpected-t_constant_encapsed_string-in-date-stamp/#findComment-1155709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.