首页 > 解决方案 > 如何将数据库中的值添加到

问题描述

标签: phpmysql

解决方案


您的问题是您没有在 while 循环中包含 html 锚标记,这就是为什么您没有在网页上获得任何 url 的原因。这是给你的演示代码。

<?php
        $SelectMainCats = mysqli_query($con, "SELECT * FROM cms_service LIMIT 0, 1");
        while($row=mysqli_fetch_assoc($SelectMainCats)){
              $a1heading          = $row['a1heading'];
              $rm1_link           = $row['rm1_link'];
           echo '<a href=". $rm1_link . " class="custom-btn mr-3 mt-3"><i class="fas fa-plus f-14 mr-3"></i> Ver mas</a>"';
        }
    ?>

推荐阅读