2014-01-22 65 views
0

我是CakePHP的新手,在html->link有問題。我希望在每篇文章中看到更多內容,但它只能在一個職位上工作。如何在cakephp中使用html?

代碼:

<a href="javascript:void(0);" onclick="showMoreComment(<?php echo $rprt_data['CountedComment']?>,<?php echo $rprt_data['Issue']['IssueId']?>)">View <?php echo $rprt_data['CountedComment']-3;?> earlier comments</a> 
+0

View earlier comments我PROGRAMM是這樣,請大家幫忙 – user3222264

回答

0
echo $this->Html->link(
    'View ' . ($rprt_data['CountedComment'] - 3) . ' earlier comments', 
    'javascript:showMoreComment(' . $rprt_data['CountedComment'] .', ' . $rprt_data['Issue']['IssueId'] .')' 
); 

如果您仍然有問題,請粘貼該視圖代碼的其餘部分