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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -