= 1; $i < $len; $i++):
?>
<div>
<input type='text' name='weapons[]'/>
</div>
<?php endfor;
endif;
?>
I don't know about you but I prefer to debug this kind of code than the curly bracket ones for inline PHP. Sure it's a bit longer, but to me it's easier to read and debug.
if ($len > 1) for($i = 1; $i < $len; $i++) echo "<div>\n\t<input type='text' name='weapons[]'/>\n</div>";
Обсуждают сегодня