Home >Backend Development >PHP Tutorial >PHP string concatenation
In Java, we usually use '+' to connect strings. In PHP, we use '.' to connect strings.
Recommended manual: php complete self-study manual
Php code
<?php $i='I'; $love=' Love'; $you=' You'; //连接一下三个字符串 echo $i.$love.$you; ?>
The output result is: I Love You
Recommended related articles:
1.What is the string concatenation operator in php?
2.Comparison of the efficiency of several string concatenations in php
Related video recommendations:
1.Dugu Jiujian (4)_PHP Video tutorial