Home > Backend Development > PHP Problem > php string concatenation

php string concatenation

王林
Release: 2023-02-24 06:24:02
Original
10028 people have browsed it

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:

php string concatenation

##2 , enter the structure of the php web page (), as shown in the figure:

php string concatenation

#Recommended Manual
: php Complete Self-Study Manual
3. Declare the file type and encoding for PHP interaction with the browser, as shown in the figure:

php string concatenation

4. Define two string variables, str1 and str2 respectively, and assign them to 'Hello' and 'World! ', as shown in the figure:

php string concatenation

5. Use the . sign to splice two string variables, as shown in the figure :

php string concatenation

6. Run the web page and output the string variable str3, as shown in the figure:

php string concatenation

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 tutorial

The above is the detailed content of php string concatenation. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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