Use echo!

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:13:49
Original
1210 people have browsed it

echo() function outputs one or more strings.

can output the value of the string variable ($str):

$str = "hello world";
echo $str;
Copy after login
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.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template