Php learning-delimiters format errors. The following is an error code. can you see what went wrong ?? I am a beginner and have no idea what to do. but I have to try it myself to find out where the following code is wrong. can you tell me what went wrong ?? I am a beginner and have no idea what to do. but I have to try it myself to find out what is wrong. neither the book nor the tutorial will tell me what is wrong.
Error Code: Parse error: syntax error, unexpected $ end
In H: wampwwwestingest2.1.4.php on line 16
Error source code:
$ Str = <
Test string
Test string
Test string
EOD;
Echo $ str; // variables defined for delimiters
$ Name = Einstein; $ dicta = "Imagination is more important than knowledge, because knowledge is limited, and imagination is unlimited ";
$ Size = 5;
Echo <
Said: "{$ dicta }"
EOT;
?>
Eclipse error Image
Incorrect image
This error is actually very simple, that is, when the delimiter EOD and EOT end, the front side adds a Tab, the solution is to write "EOD;" and "EOT;" at the top ;". I believe that beginners have the same experience as me ......
Correct code:
$ Str = <
Test string
Test string
Test string
EOD;
Echo $ str;
// Defines the variable $ name = Einstein for the delimiter;
$ Dicta = "Imagination is more important than knowledge, because knowledge is limited, and imagination is unlimited ";
$ Size = 5;
Echo <
Said: "{$ dicta }"
EOT;
?>
Why ?? I am a beginner and have no idea what to do. but I have to try it myself to know what to do...