CakePHP HTML Helper

I am trying to replicate the following code using HTML Helper in CakePHP 2.1. Not sure how to include the Span tag into the tag.

<div class="backTo">
    <a href="#" title="">
      <img src="images/icons/topnav/mainWebsite.png" alt="" />
      <span>Main website</span>
    </a>
</div>

What i have tried

<?php echo $this->Html->image("icons/topnav/mainWebsite.png", array("alt" => "Back", 'url' => array('controller' => 'pages', 'action' => 'display', 'home')); ?>

Answers


echo $this->Html->link(
    $this->Html->image('...', array(...)) . '<span>Main website</span>',
    array('controller' => ...),
    array('escape' => false)
);

Need Your Help

regex &align:%HORIZONTAL%|%VERTICAL%

php regex

I would like to have a regex that matches something like this:

viewport maximum-scale with user-scalable=no on android

android viewport

Is there any way to set viewport with maximum-scale=0.5 and user-scalable=no? When I set user-scalable=no then android ignores maximum-scale