How append a string in PHP
There is no specific function to append a string in PHP. But you can use the PHP concatenation assignment operator (.=) to append a string with another string.
.=
Let's check out the following example to understand how it basically works:
<?php $a = "Hello"; $a .= " World!"; echo $a; // Outputs: Hello World! ?>
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Use the PHP String Operators
There is no specific function to append a string in PHP. But you can use the PHP concatenation assignment operator (
.=) to append a string with another string.Let's check out the following example to understand how it basically works:
need an explanation for this answer? contact us directly to get an explanation for this answer