Let's talk about the definition and usage of the PHPecho () function. 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. Tip: echo () function is faster than print ()
Let's talk about the definition and usage of the PHP echo () function. 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. Tip: echo () function is faster than print ()
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"
1 .\"\"
2.
Echo <
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);?>Bob's Auto Parts
Bob's Auto Parts
<?phpfor ($i = ; $i < ; $i++) {echo "
| ";}?>
The above content mainly introduces the connection format of the PHP Echo string, hoping to help you!