symfony - Select options are overwritten in symfony2 . How can i avoid that -
{% tablefield in tablefieldsarr %} <tr> <td> <select> <option name="{{ tablefield }}">{{ tablefield }}</option> </select> </td> </tr> {% endfor %}
i trying generate select box options each tr
row above code getting select box 1 item in each row. how can fix it?
$tablefieldsarr
comes controller.
you have move for
loop inside select:
{% in 0..tablefieldsarr|length %} <tr> <td> <select> {% tablefield in tablefieldsarr %} <option name="{{ tablefield }}">{{ tablefield }}</option> {% endfor %} </select> </td> </tr> {% endfor %}
Comments
Post a Comment