Php 如何在单个数组中组合多个变量
任何一个都有助于在多个变量中转换单个数组。在代码中找到为以下属性赋值的位置Php 如何在单个数组中组合多个变量,php,arrays,Php,Arrays,任何一个都有助于在多个变量中转换单个数组。在代码中找到为以下属性赋值的位置 $arrray = array( $this->_SmailerTyle => "PHPMailer", $this->_SsendMail => "smtp", $this->from => "arun.r@infinitisoftware.net", $this->to
$arrray = array(
$this->_SmailerTyle => "PHPMailer",
$this->_SsendMail => "smtp",
$this->from => "arun.r@infinitisoftware.net",
$this->to => "example@gmail.com",
$this->subject => "This is example subject",
$this->message => "This is example message",
);
print_r($arrray);
您是否收到任何错误?没有Hemant,但我的out put
数组([]=>这是示例消息)
删除$This->
并写入'message'
,因为它试图使用$This->…
作为每个值的索引,我假设这些值为空或不存在。这意味着每一个值都会覆盖上一个值,最后你会得到你得到的数组。谢谢你的回复@NigelRen,这是你评论的关键点之一。
$this->_SmailerTyle
$this->_SsendMail
$this->from
$this->to
$this->subject
$this->message