Array how to combine a variable and text [duplicate]
Below is code:
$domainname = $_POST[domainname];
array(
'action' => 'create',
'domain' => '.website.com',
'create' => 'Create'
));
I need to add variable $domainname
to 'domain'
.
I try to do somelike this but not working:
array(
'action' => 'create',
'domain' => .$domainname'.website.com',
'create' => 'Create'
));
Solution 1:
change:
'domain' => .$domainname'.website.com',
To:
'domain' => $domainname.'.website.com',