How to combine two strings together in PHP? -
i don't know how describe wanted i'll show you:
for example:
$data1 = "the color is"; $data2 = "red";
what should (or process) $result combination of $data1
, $data2
?
desired result:
$result = "the color red";
$result = $data1 . $data2;
this called string concatenation. example lacks space though, specifically, need:
$result = $data1 . ' ' . $data2;
Comments
Post a Comment