PHP 换行写代码
PHP code for writing in new line
$smarty->assign('buttonText', $this->l('CREDIT CARD | DEBIT CARD | NETBANKING NO Extra Charges '));
我希望修改此代码,使“No Extra Charges”位于新行而不是同一行
当前输出
CREDIT CARD | DEBIT CARD | NETBANKING NO Extra Charges
预期产出
CREDIT CARD | DEBIT CARD | NETBANKING
NO Extra Charges
这是写在PHP中的。整个代码是
public function hookPayment($params)
{
if (!$this->active)
return;
global $smarty;
$smarty->assign('buttonText', $this->l('CREDIT CARD | DEBIT CARD | NETBANKING NO Extra Charges '));
return $this->display(__FILE__, 'payment.tpl');
}
你能把断线 <br>
放到 smarty 变量中吗?据我所知,Smarty 它应该可以工作。
$smarty->assign('buttonText', $this->l('CREDIT CARD | DEBIT CARD | NETBANKING<br>NO Extra Charges '));
$smarty->assign('buttonText', $this->l('CREDIT CARD | DEBIT CARD | NETBANKING NO Extra Charges '));
我希望修改此代码,使“No Extra Charges”位于新行而不是同一行
当前输出
CREDIT CARD | DEBIT CARD | NETBANKING NO Extra Charges
预期产出
CREDIT CARD | DEBIT CARD | NETBANKING
NO Extra Charges
这是写在PHP中的。整个代码是
public function hookPayment($params)
{
if (!$this->active)
return;
global $smarty;
$smarty->assign('buttonText', $this->l('CREDIT CARD | DEBIT CARD | NETBANKING NO Extra Charges '));
return $this->display(__FILE__, 'payment.tpl');
}
你能把断线 <br>
放到 smarty 变量中吗?据我所知,Smarty 它应该可以工作。
$smarty->assign('buttonText', $this->l('CREDIT CARD | DEBIT CARD | NETBANKING<br>NO Extra Charges '));