Thursday, September 13, 2012

In php concatenate 2 string variables


There is only one string operator in PHP to concatenate string variables. And this operation is DOT (.). 

e.g., 

$fname = "Swapnil" 
$lname = "Goswami"

print "Hello". " " . $fname . " " . $lname

This would result into 

Hello Swapnil Goswami

No comments:

Post a Comment