I’m trying to get a PHP variable to return ordinary HTML code, as well as the current year (expressed using echo date("Y");). Here’s my current syntax:
$myvar = "Lorem ipsum dolor sin amet " echo date("Y") " foo bar";
I get an error saying . What am I doing wrong?
Parse error: syntax error, unexpected T_ECHO in /path/to/my/document on line 28
1 Answer