ご覧いただきありがとうございます。
php
1$counter=7; 2<?php for($i=0;$i<$counter;$i++): ?> 3 <input type="hidden" name="poll_number" value="<?= $i; ?>"> 4 <input type="hidden" name="id" value="<?= $id;?>"> 5 <input type="submit" name="polling" value="<?php echo $polls[$id][0][$i]; ?>"> 6<?php endfor; ?>
上記のfor文で、input hidden name="poll_number"がvalue=6で7つできてしまいます。
value = 1 value = 2....となると思っていたのですが、何が問題でしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/10/18 02:04
退会済みユーザー
2017/10/18 02:12