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)
以上不起作用.
谢谢...
您必须br为此目的使用标记:
<?php echo $this->Html->link("My Anchor Text <br /> with new line", '/mycontroller/myaction', array('escape' => false)); ?>
Run Code Online (Sandbox Code Playgroud)