title: How to post radio button value false/0, if radio button option is not selected & set true/1, if value is selected in the form of array?
body: <p>I need an array of radio type input field, array contain index value 0 if option is not selected &amp; 1 if the option is selected. </p>
  
  <p>This is form </p>
  
  <p><a href="https://i.stack.imgur.com/DUqCQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DUqCQ.jpg" alt="enter image description here"></a></p>
  
  <p>This is HTML code</p>
  
  <pre><code>    &lt;div class='input-group'&gt;
          &lt;input type="radio" name='correctOption[]'&gt;
          &lt;span class="input-group-addon"&gt;&lt;i class="fa fa-pencil"&gt;&lt;/i&gt;&lt;/span&gt; 
          {!! Form::text('optionText[]', '', array('class' =&gt; 'form-control','id' =&gt; 'optionText1')) !!}
     &lt;/div&gt;
  </code></pre>
  
  <p>I get array form value like this </p>
  
  <p>[correctOption] => Array
          (
              [0] => on
          )</p>
  
  <p>but I want like this </p>
  
  <pre><code>[correctOption] =&gt; Array
          (
              [0] =&gt; 0,
              [1] =&gt; 0,
              [2] =&gt; 1,
              [3] =&gt; 0,
              [4]=&gt;0
  
          )
  </code></pre>