PHP - Concatenate Strings
Δημοσιευμένα 2024-05-17 07:30:24
0
8χλμ.
String Concatenation
To concatenate, or combine, two strings you can use the .
operator:
The result of the example above is HelloWorld
, without a space between the two words.
You can add a space character like this:
An easier and better way is by using the power of double quotes.
By surrounding the two variables in double quotes with a white space between them, the white space will also be present in the result:
Complete PHP String Reference
For a complete reference of all string functions, go to our complete PHP String Reference.
Αναζήτηση
Κατηγορίες
- Art
- Causes
- Crafts
- Dance
- Drinks
- Film
- Fitness
- Food
- Παιχνίδια
- Gardening
- Health
- Κεντρική Σελίδα
- Literature
- Music
- Networking
- άλλο
- Party
- Religion
- Shopping
- Sports
- Theater
- Wellness
Διαβάζω περισσότερα
PHP Comments
Comments in PHP
A comment in PHP code is a line that is not executed as a part of the program....
PHP Break
The break statement can be used to jump out of different kind of loops.
Break in For...
PHP Nested if Statement
Nested If
You can have if statements inside if statements, this is...
PHP Shorthand if Statements
Short Hand If
To write shorter code, you can write if statements on one line....
PHP Operators
PHP Operators
Operators are used to perform operations on variables and values.
PHP divides the...