简体   繁体   中英

Insert image inside an a link tag

The code below in not working

 <?php echo $this->Html->link($this->Html->image('ilmelogo.png'),array('controller'=>'pages','action'=>'feedback')); ?>

But this code is working. Help me out

<?php   echo $this->Html->image('ilmelogo.png'); ?>

Can you try this,

echo $this->Html->link(
    $this->Html->image('ilmelogo.png'),
    '/pages/feedback',
    array('class' => 'button', 'target' => '_blank')
);

OR

<?php
echo $this->Html->link(
    $this->Html->image("ilmelogo.png", array("alt" => "ilme Logo")),
    array(
    'controller' => 'pages',
    'action' => 'feedback'
    )
);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM