append character to string php code example
Example 1: php insert character into string
$newstr = substr_replace($oldstr, $str_to_insert, $pos, 0);
Example 2: php append string
<?php
$a = "Hello ";
$b = $a . "World!"; // now $b contains "Hello World!"
$a = "Hello ";
$a .= "World!"; // now $a contains "Hello World!"
?>