S
S
semki0962016-05-06 23:24:35
PHP
semki096, 2016-05-06 23:24:35

How to add a class ROW html - bootstrap markup in a loop?

I deduce in a cycle an array - in the form of blocks. In the loop I add html markup. The question is how to add the row class ROW, because I have iteration after iteration forms blocks, and there is no way to form a row. Perhaps there is some kind of framework without inline markup? Or is there some kind of trick how to solve it beautifully and without crutches?
Here's what I thought. Maybe add a field and indicate which line the entry belongs to and at what position? Logic will appear, but it is not yet clear how to do it in practice - how to generate tags around a string.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Tregubenko, 2016-05-07
@semki096

purpose is not very clear. if you need to generate the markup yourself, then use jade (now pug), this thing will help you write layout using OOP and 800 lines of .html will be generated from 100 lines of code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question