当前位置:Gxlcms > PHP教程 > php里面如何循环嵌入html元素

php里面如何循环嵌入html元素

时间:2021-07-01 10:21:17 帮助过:3人阅读

php里面怎么循环嵌入html元素

  • 中奖信息



      $sql = "select * from t_activity where MemberID='$memberID'";
      $res = $db->GetData($sql);

      while ($res)
      {
    • 1


    • }
      $obj = mysqli_fetch_object($res);
      ?>





  • 如上面,从数据库取出数据来后,怎么从数据库结果集中循环输出想要的数据在html的li里面?
    ------解决方案--------------------

  • 中奖信息



      $sql = "select * from t_activity where MemberID='$memberID'";
      $res = $db->GetData($sql);

      while ($obj = mysqli_fetch_object($res))
      {
      ?>
    • 字段 ;?>

    • }

      ?>



  • 人气教程排行