Insert line break after every two rows of database

前端 未结 6 1281
清酒与你
清酒与你 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:11

    $i=1;
    while ($row = mysql_fetch_array($query))
    {
        //your code
        if ($i % 2 == 0)
            echo '
    '; $i++; }

提交回复
热议问题