Php learning-format of delimiters-PHP Tutorial

Source: Internet
Author: User
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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.