文章出處

1.所用php變量名為$recent_tests,是一個二維數組,示例如下:

1 $recent_tests[0]["test_url"] = www.baidu.com
2 $recent_tests[0]["result_url"] = www.baidu12345678_result.com
3 $recent_tests[1]["test_url"] = www.https://cnpvgvb1od054.pvgl.sap.corp:8443/store/.com
4 $recent_tests[1]["result_url"] = www.https://cnpvgvb1od054.pvgl.sap.corp:8443/store/_result.com

2.其中"test_url"為頁面顯示內容,"result_url"為鏈接定向地址,即href值。

3.代碼如下:

 1 <table class="table table-hover">
 2 <thead>
 3   <tr>
 4     <th>#</th>
 5     <th>URL</th>
 6   </tr>    
 7   </thead>
 8   <tbody>
 9       <tr>
10          <th scope="row">1</th>
11       <td><a href="<?php $recent_tests[0]["result_url"] ?>" target="_blank"><?php echo $recent_tests[0]['test_url']; ?></a></td>
12        </tr>
13     <tr>
14            <th scope="row">2</th>
15            <td><a href="<?php $recent_tests[1]["result_url"] ?>" target="_blank"><?php echo $recent_tests[1]['test_url']; ?></a></td>
16     </tr>
17   </tbody>
18 </table>

4.頁面顯示如下:

 


文章列表




Avast logo

Avast 防毒軟體已檢查此封電子郵件的病毒。
www.avast.com


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()