Using the CakePHP Html helper, how does one go about inserting a line break in the anchor text?
<?php echo $this->Html->link("My Anchor Text \n with new line", '/mycontroller/myaction'开发者_如何学Python); ?>
The above doesn't work.
Thanks...
You have to use the br
tag for this purpose:
<?php echo $this->Html->link("My Anchor Text <br /> with new line", '/mycontroller/myaction', array('escape' => false)); ?>
精彩评论