In HTML and PHP writing, echo can output multiple strings at the same time, and does not require parentheses.
Print can output only one string at a time, requiring parentheses.
The use of print is similar to the C language, so you will have a special explanation for the% in the output.
ECHO has no return value, and print () has a return value that returns Flase when its execution fails, such as a disconnection.
Echo can have multiple arguments, print a parameter. It is recommended to use ECHO.
Look at the example below to see what the print <<<eot in PHP is for:
Copy Code code as follows:
Print <<<eot
<body>
$value;
...
</body>
EOT;
Meaning:
<<< operator, which treats the variables between the custom delimiters as strings;
EOT a custom delimiter, at the end of which must be at the beginning of the line;
Use <<< tags on the same page
Mark
Note: The tag name is paired and the same page does not allow more than two tag names to appear in the same name;
Another: The end tag name of the pairing tag name should be on a single line, with no output characters allowed ... (for example, spaces such as invisible but existing characters ...).
Advantages: This allows you to output large segments of HTML without having to escape the inside quotes without having to "automatically replace the variables inside."
How to output HTML code in PHP (EOT)
PHP code
Copy Code code as follows:
<?php
Echo <<< EOT
<table width=80% border= "2" cellpadding= "3" cellspacing= "0" bordercolor= "#808080" >
<tr bgcolor= "#84A9E1" >
<TD align= "center" >ClassID</td>
<TD align= "center" >stuno</td>
<TD align= "center" > Student name </td>
<TD align= "center" > Parent name </td>
<TD align= "center" > Parent Cell phone number </td>
</tr>
EOT;
?>
Detailed Source reference: http://www.jb51.net/article/16022.htm