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

Example

<?php 
  
// First String 
$a = 'Welcome '; 
  
// Second String 
$a.= "to You !"; 
  
// Print The String $a 
echo $a; 
?>
// Outputs: Welcome to You !
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments