为什么我的PHP变量不会出现在CakePHP视图中的HREF中?

use*_*non 0 php cakephp

在我的CakePHP代码中,我有以下代码.如果我单击图像删除它将移动到href中的链接.在href我不知道如何显示我的PHP值.我尝试过如下,但它不起作用.

   <a href="http://localhost/cake_1.2.1.8004/index.php/forms/delete/"<?php echo $r['Form']['id'];?> >
    <img border="0" alt="Delete" src="/cake_1.2.1.8004/app/webroot/img/delete.png"/>
  </a>
Run Code Online (Sandbox Code Playgroud)

有什么建议?

小智 5

使用cakephp查看助手:

<?php
    echo $html->link(
        $html->image('delete.png'),
        array('action'=>'delete', $r['Form']['id']),
        array(),
        'really delete?',
        false
    );
?>
Run Code Online (Sandbox Code Playgroud)