Home >Backend Development >PHP Problem >php string concatenation
This article introduces the splicing method of strings in php for beginners.
1. Create a new 151.php, as shown in the picture:
##2 , enter the structure of the php web page (), as shown in the figure:
: php Complete Self-Study Manual3. Declare the file type and encoding for PHP interaction with the browser, as shown in the figure:
4. Define two string variables, str1 and str2 respectively, and assign them to 'Hello' and 'World! ', as shown in the figure:
5. Use the . sign to splice two string variables, as shown in the figure :
6. Run the web page and output the string variable str3, as shown in the figure:
Recommended related articles:
1.
What is the string connection operator in php2
.Comparison of the efficiency of several string connections in php Related video recommendations:
1.Dugu Jiujian (4)_PHP video tutorial
The above content is for reference only !
Recommended video tutorial:
PHP video tutorialThe above is the detailed content of php string concatenation. For more information, please follow other related articles on the PHP Chinese website!