How can I combine two strings together in PHP?

I don’t actually know how to describe what I wanted, but I’ll show you:

For example:

$data1 = "the color is";
$data2 = "red";

What should I do (or process) so $result is the combination of $data1 and $data2?

Desired result:

$result = "the color is red";

1Best Answer
17

Leave a Comment