I am making a quiz site and would like to make a form for a dynamic number of questions $questions(passed to this form) and for each question there to be one text input(question title) and four text input choices(four question choices) and next to check text a radio button(to determine if this text is correct if checked the value becomes 1)
I've tried to make this functuality with for loops but havent been very successful accessing the arrays and all the tutorials on blade don't show anything similar to this
<form action="" method="POST">
@for($i = 0; $i < $questions;$i++)
<input type="text" name="question[]" value="">
<br>
@for($j = 0;$j < 4;$j++)
Choose <input type="checkbox" name="isCorrect[][]" value="0" onchange="check()">
<input type="text" name="choice[]">
<br>
@endfor
<br>
@endfor
<br>
<input type="submit">
</form>
via gustproxy