从php脚本中制作可点击的文本


making clickable text from php script

下面有一个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>";
  }
  ?> 

产生以下输出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>

我想知道,如何将每个列表项(即配置和维护服务)作为可点击的链接?

请将锚标记内的值作为进行回显

<?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>";
}
echo "<a href='whatever_your_url_is'>".$row['operation']."</a>";