2013-03-05 47 views
-3

我想用超鏈接顯示變量。有誰知道如何給?我已經申請了以下方法HREF:phpfox; _如何在php中給變量href

<div style="width:50px;height:20px;float:right"> 
    <a href="#" onclick="$.ajaxCall('forum.UnFlag', 'user_id={$aThread.user_id} &thread_id={$aThread.thread_id} &rate_value=i', 'GET'); return false;"> 
      <button class="button" name="val[button]" value="">$i </button> 
    </a> 
    <?php 
      for ($i=0; $i <= 10; $i++) 
      { 
       echo "The number is ".$i."<br />"; 
      } 
    ?> 
</div> 

,如果你需要任何有關這問我..

+0

您是否想回顯變量名=變量值? – Vineet1982 2013-03-05 05:43:45

回答

0

嘗試

<?php 
    for ($i=0; $i <= 10; $i++) 
    { 
     echo "The number is <a href=".$i." rel="">".$i."</a><br />"; 
    } 
?> 

,並更改以下包變量中php代碼。

<button class="button" name="val[button]" value=""><?php echo $i; ?></button>