How append a string in PHP

I’ll share with you how to append a string to PHP. No special function exists to concatenate more than one string. To connect a string with another string, you can use the concatenation assignment operator (.=). This very way to append a string in PHP


// First String 
$a = 'Welcome '; 
// Second String 
$a.= "to You !"; 
// Print The String $a 
echo $a; 
// Outputs: Welcome to You !

Leave a Reply

Your email address will not be published. Required fields are marked *