CakePHP - 如何在Html帮助程序超链接中插入新行/换行符

LCR*_*LCR 2 cakephp cakephp-1.3 cakephp-1.2

使用CakePHP Html助手,如何在锚文本中插入换行符?

<?php echo $this->Html->link("My Anchor Text \n with new line", '/mycontroller/myaction'); ?>
Run Code Online (Sandbox Code Playgroud)

以上不起作用.

谢谢...

dho*_*tet 6

您必须br为此目的使用标记:

<?php echo $this->Html->link("My Anchor Text <br /> with new line", '/mycontroller/myaction', array('escape' => false)); ?>
Run Code Online (Sandbox Code Playgroud)