如何正确地将“+1”添加到 php 变量

How to properly add a "+1" to the php variable

我对我的一个变量有点迷茫,需要你的帮助。我正在尝试将 +1 添加到我的 phone 数字变量的默认值,这样我就不必在前面使用它了。

当前行:

$this->sendSMS($plainMessage, $users['mobile_number']);

接下来我尝试的是:

$mobile_number = "+1" . $mobile_number
$this->sendSMS($plainMessage, $users['mobile_number']);

我很确定这是错误的,但我的大脑卡住了。

选项 1:

$mobile_number = "+1" . $users['mobile_number'];
$this->sendSMS($plainMessage, $mobile_number);

选项 2:

$this->sendSMS($plainMessage, "+1" . $users['mobile_number']);

点前后不需要空格。