echo() function outputs one or more strings.
can output the value of the string variable ($str):
$str = "hello world";
echo $str;
Copy after login
echo() function is slightly faster than
print().
Concatenate two string variables:
$str1 ="hello";
$str2 = "world";
echo $str1." ".$str2;
Copy after login
Write an array value to the output:
$arr = array("bill"=>"35");
echo "bill is ".$arr['bill']." years old.";
Copy after login
How to use multiple parameters:
echo 'This ','string ','was ','made ','with multiple parameters.';
Copy after login
The difference between single quotes and double quotes. Single quotes will output the variable name instead of the value:
$color = "red";
echo "Roses are $color";
echo "<br>";
echo 'Roses are $color';
Copy after login
For other applications, please refer to: http://www.w3school.com.cn/php/func_string_echo.asp;
The above introduces the use of echo! , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.