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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -