How to prepend a string in PHP?
Here the PHP Concatenation Operator is used.
There is no specific function to prepend a string in PHP. But the PHP is used concatenation operator (.) to prepened a string with another string.
<?php $a = "Hello"; $b = "World!"; $b = $a . " " . $b; echo $b; // Outputs: Hello World! ?>