We have given two strings and the task is to append a string str1 with another string str2 in PHP. There is no specific function to append a string in PHP. In order to do this task, we have the this operator in PHP:
Using Concatenation assignment operator (“.=”): The Concatenation assignment operator is used to append a string str1 with another string str2.
$x .= $y
Using Concatenation Operator(“.”): The Concatenation operator is used to append a string str1 with another string str2 by concatenation of str1 and str2.
$x . $y
- PHP append one array to another
- p5.js | append() function
- PHP | ArrayIterator append() Function
- PHP | AppendIterator append() Function
- ArrayObject append() function in PHP
- jQuery | append() Method
- Express.js res.append() Function
- HTML DOM ParentNode.append() Method
- How to append Angular styles in footer ?
- How to append an element in two seconds using jQuery ?
- How to Convert Data URI to File then append to FormData?
- How to append class if condition is true in Haml?
- How to check a string starts/ends with a specific string in jQuery ?
- PHP | Program to check a string is a rotation of another string
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.