php concat string function code example Example: php concat $a = "hello"; $b = "world"; $c = $a . " " . $b; echo $c; // hello world