PHP Echo string connection format, phpecho string format
Let's talk about the PHP echo () function.
Definition and usage
The echo () function outputs one or more strings.
Note: The echo () function is not actually a function, so you do not need to use parentheses for it. However, if you want to pass more than one parameter to echo (), using parentheses will generate a resolution error.
Prompt: The echo () function is faster than print.
PromptThe echo () function also has a short syntax. Before PHP 5.4.0, this syntax is only applicable when short_open_tag configuration is enabled.
Syntax
Echo (strings)
Parameters |
Description |
Strings |
Required. One or more strings to be sent to the output. |
Technical details
Return Value: |
No return value. |
PHP version: |
4 + |
The connection format of the PHP Echo string is described as follows:
echo "<td align=\"center\">
1 .\"\"
2.
echo <<<theEndline 1line 2line etheEnd
Instance
Three random images (banner)
<?php$pictures = array('tire.jpg', 'oil.jpg', 'spark_plug.jpg','door.jpg', 'steering_wheel.jpg','thermostat.jpg', 'wiper_blade.jpg','gasket.jpg', 'brake_pad.jpg');shuffle($pictures);?>
The above content mainly introduces the connection format of the PHP Echo string, hoping to help you!
Articles you may be interested in:
- Php echo output string functions
- PHP learning output string (echo, print, printf, print_r and var_dump)