2014-10-10 100 views
-1

我有以下使得從PHP腳本點擊文本

<?php include 'db_connector.php'; 
    $result = mysqli_query($con,"SELECT operation FROM contract"); 
    while($row = mysqli_fetch_array($result)) { 
    echo $row['operation']; 
    echo "<br>"; 
    echo "<br>"; 
    } 
    ?> 

一個PHP腳本,產生對AP活動

Configure & Maintain Service 

Configure & Monitor SNC 

Configure & Monitor Service 

Report ON SNC Events 

以下輸出 報告上午如下

使用它在我的代碼
<div class="description"><a id="openpanel"><?php include 'showall_contract.php';?></a></div> 

我想知道,我怎樣才能讓每個列表項(即配置&維護服務)作爲可點擊的鏈接?

+0

查看HTML錨標記。 [這裏是手冊](http://www.w3.org/TR/html401/struct/links.html) – RiggsFolly 2014-10-10 09:33:33

+0

我想你想每個鏈接產生不同的結果。意味着不同的輸出 – 2014-10-10 09:35:59

回答

1

請回聲定位標記裏面的值作爲

<?php include 'db_connector.php'; 
     $result = mysqli_query($con,"SELECT operation FROM contract"); 
     while($row = mysqli_fetch_array($result)) { 
     echo "<a href='your url' >".$row['operation']."</a>"; 
     echo "<br>"; 
     echo "<br>"; 
     } 
     ?> 
1
echo "<a href='whatever_your_url_is'>".$row['operation']."</a>";