Cakephp:将链接添加到echo中
我有这样一行代码Cakephp:将链接添加到echo中,php,html,cakephp,Php,Html,Cakephp,我有这样一行代码 <?php echo __('This is text and the word TEXT has to be a link'); ?> 有没有什么好办法把“TEXT”这个词链接到另一个href地址?也许不改变整个结构?由于我使用的是i18n翻译,因为网站使用的是3种语言,所以我希望尽可能减少更改 提前谢谢 您可以尝试将链接作为参数传递给_;()函数: <?= __('This is text and the word {0} has to be a l
<?php echo __('This is text and the word TEXT has to be a link'); ?>
有没有什么好办法把“TEXT”这个词链接到另一个href地址?也许不改变整个结构?由于我使用的是i18n翻译,因为网站使用的是3种语言,所以我希望尽可能减少更改
提前谢谢 您可以尝试将链接作为参数传递给_;()函数:
<?= __('This is text and the word {0} has to be a link', $this->Html->link(...)) ?>
更多信息可在此处找到:您可以尝试将链接作为参数传递给_u;()函数:
<?= __('This is text and the word {0} has to be a link', $this->Html->link(...)) ?>
更多信息可在此处找到: