I have two variables, $firstname & $lastname
I want to combine them as another variable $realname
So example: if firstname=John &lastname=Smith, then I want realname=John Smith
Would this be the correct usage?
$realname = $firstname & " " & $lastname;
?>
CodePudding user response:
<?php
$realname = "$firstname $lastname";
?>
Concatenation in php is achieved by concat operator i.e .