New containing div after every 3 records

前端 未结 3 1067
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-29 13:23

I would like to create a new containing

after 3 results, using PDO result loop.

For my self-study-project I have to made a product page with

3条回答
  •  我在风中等你
    2020-11-29 13:44

    You need to add a new closure tag and open new one every 3th iteration.

            
    query($sql); $stmt->execute(); $i=1; while ($row = $stmt->fetch(PDO::FETCH_OBJ)) { ?>
    pname ?>
    Levertijd: pdelivertime ?>
    pprice ?>
    "; $i++; } ?>

提交回复
热议问题