To allow multiple strings to be bridged, use one (.) " Point "number, for example:
- Php
- $ name "W3pop";
- echo $name. " COM ";
- ?>
The above output is w3pop.com
There is a case where a PHP string is connected, and when Echo uses the (") double quotation mark, you can achieve the same effect as the following:
- Php
- $ name "W3pop";//The same sentence
- echo "$name. com";//the variable in double quotes can be displayed normally,
and is automatically separated from the normal string.
- ?>
However, if it is a single quote, the contents of the content will be fully exported to the browser in string form:
- Php
- $ name "w3pop.com";
- echo ' $name. com ';
- ?>
will display $name.com
PHP string Connection Sample code:
- Php
- $ name = "W3pop" ;
- echo $name. " COM ";
- ?>
- < BR />
- Php
- $ name = "W3pop" ;
- echo "$name. com";
- ?>
- < BR />
- Php
- $ name = "W3pop.com" ;
- echo '. com ';
- ?>
Output results
W3pop.com
W3pop.com.com
$name. com
How about, everyone through the above three pieces of code to demonstrate, have you mastered the method of PHP string connection?
http://www.bkjia.com/PHPjc/446324.html www.bkjia.com true http://www.bkjia.com/PHPjc/446324.html techarticle To allow multiple strings to be bridged, use one (.) " Point "number, for example:? PHP $ name = "W3pop"; Echo$name. ". Com ";? The above output is that w3pop.com has a PHP string connection ...