Using PHP loop to add Bootstrap rows and proper column numbers to elements

后端 未结 6 1651
一整个雨季
一整个雨季 2020-12-08 22:06

I\'m trying to create the following front-end using a PHP loop and Twitter Bootstrap\'s 12 column grid system:

The HTML output is:

6条回答
  •  渐次进展
    2020-12-08 22:45

    Why don't you evaluate your modulo?

    $two = false; 
    if($i%3 == 2)
    {
          
    Content...
    $two = true; } if($i%3 == 1) { if($two) {
    Content...
    } else {
    Content...
    } }

提交回复
热议问题