String concatenation in PHP

后端 未结 2 1054
陌清茗
陌清茗 2021-01-20 00:59

Is it possible to send some text message with an echo?

I\'m looking for something like: if($xml) echo $xml+\"hello world;

This is my PHP:

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-20 01:53

    Use . instead of + to concatenate in PHP.

    if($xml) { echo $xml . "hello world"; }

提交回复
热议问题