Insert line break after every two rows of database

前端 未结 6 1292
清酒与你
清酒与你 2021-01-16 08:31

I have a little script that prints a certain amount of rows in a mysql database.

Is there any way to make it so that after every second row it prints, ther

6条回答
  •  醉酒成梦
    2021-01-16 09:37

    add new variable before the loop

    $i = 0;
    

    then in your loop add

    if ($i != 0 && $i%2 == 0)
       echo '
    ';

提交回复
热议问题