In HTML and PHP writing, echo can output multiple strings at the same time, without the need for parentheses.
Print can only output one string at a time, requiring parentheses.
Print is used in a very similar way to the C language, so there is a special explanation for the% in the output content.
ECHO has no return value, print () has a return value, and returns Flase when its execution fails, such as a broken wire.
Echo can have multiple parameters, print one parameter. Recommended with Echo.
See the example below to see the print << in PHP
Copy CodeThe code is as follows:
Print <<
$value;
...
EOT;
Meaning:
The <<< operator, which treats the variables between the custom delimiters as strings, can be processed;
EOT a custom delimiter, which must be at the beginning of the line at the end;
Use << on the same page <标记
Tag
Note: The tag name is paired, the same page is not allowed to appear with the same name more than two tag names;
Another: The end tag name of the pairing tag name should be a single line, the output characters are not allowed before and after ... (such as spaces such as invisible but existing characters ...).
Pros: This allows you to output a large segment of HTML without escaping the quotes inside it or replacing the variable inside with a "."
How to output HTML code in PHP (EOT)
PHP code
Copy CodeThe code is as follows:
Echo <<< EOT
http://www.bkjia.com/PHPjc/321232.html www.bkjia.com true http://www.bkjia.com/PHPjc/321232.html techarticle in HTML and PHP writing, echo can output multiple strings at the same time, without the need for parentheses. Print can only output one string at a time, requiring parentheses. The use of print is very similar to the C language .
ClassID |
Stuno |
Student Name |
Parent's name |
Parent Mobile Number |
EOT;?> detailed source reference: http://www.jb51.net/article/16022.htm